[R] how to read/save .zip compressed files from R?

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Tue Aug 3 19:29:32 CEST 2010


In the way you describe it, no.

A) There is no such thing as a "zip folder". You are most likely being fooled by the visual presentation of zip files in Windows Explorer, which automatically simulates it as a  folder, when it is really extracting bits of data as needed to display it.

B) Because the data must be decompressed to be manipulated, there is no performance or disk space advantage to creating a facility such as you describe, though thee may be a convenience factor if you do it a lot.

C) There is a function zip.file.extract() in R for extraction, but I don't see a zip compression function, so you will need to use external programs, perhaps executed using the "system" function, to generate updated zip files.

D) It is almost always a bad idea to overwrite your original data, since this prevents you from retracing your data processing steps later for verification or debugging purposes.

J.delasHeras at ed.ac.uk wrote:

>
>Dear list,
>
>is there a way to open a .zip folder so that one can extract and  
>modify files inside and then save teh .zip folder again?
>
>thanks!
>
>Jose
>
>-- 
>Dr. Jose I. de las Heras                      Email: J.delasHeras at ed.ac.uk
>The Wellcome Trust Centre for Cell Biology    Phone: +44 (0)131 6507095
>Institute for Cell & Molecular Biology        Fax:   +44 (0)131 6507360
>Swann Building, Mayfield Road
>University of Edinburgh
>Edinburgh EH9 3JR
>UK
>*********************************************
>Alternative email: nach.mcnach at gmail.com
>*********************************************
>
>-- 
>The University of Edinburgh is a charitable body, registered in
>Scotland, with registration number SC005336.
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.



More information about the R-help mailing list