Creating a cross-platform zip file

I would like to create a zip archive from R and you need maximum compatibility between platforms, so I would prefer not to use the command system("zip").

Inside utils there is zip.file.extract(aka unzip) that uses [a lot] of c code obtained from zlib 1.1.3 in a file called dounzip.c. I could not find similar possibilities for creating zip files.

It is also difficult to create a specific google request for "cran create zip" or equivalent!

Also, tar will not be enough, I need to create a zip to use as input for a different toolbox other than R.

Would I appreciate any pointers?

amuses sign

+3
source share
2

Omega Project ! Rcompression , , - :

?gzip    
txt <- paste(rep("This is a string", 40), collapse = "\n")
v <- gzip(txt))
writeBin(v, "test.txt.zip")

+1

, gzfile() , . , 2.10.0 , . (. https://svn.r-project.org/R/trunk/NEWS - svn )

+1

Source: https://habr.com/ru/post/1720141/


All Articles