Several people mentioned that this is zip behavior, but not why this is the reason you see it. If you look at the source for zip() or even help ?zip , you should immediately understand that the behavior you see comes from the zip function of the system and has nothing to do with R. All R is a call to the system function for zipping which is the default zip :
R> zip function (zipfile, files, flags = "-r9X", extras = "", zip = Sys.getenv("R_ZIPCMD", "zip")) { if (missing(flags) && (!is.character(files) || !length(files))) stop("'files' must a character vector specifying one or more filepaths") args <- c(flags, shQuote(path.expand(zipfile)), shQuote(files), extras) invisible(system2(zip, args, invisible = TRUE))
If the extension annoys you, just call file.rename() after zip() :
file.rename("out.zip", "out")
source share