Dear R users,
My situation:
(1) I have limited workspace for my work harddisk (about 10 GiB).
(2) I have a lot of data files in R workspace (*.RData) which most of
them > 200 MiB. For some reason I zip some of them, for instance
"filename.RData (250 MiB)" to "filename.zip (3MiB)". In this
work I
have a lot of more space of my harddisk.
Normally, If I want to use "filename.RData" for my experiment, I can
do it with load("filename.RData").
Then I tried to open/load
> load("filename.zip")
Error: bad restore file magic number (file may be corrupted) -- no data
loaded>
My question:
How can I open/load "filename.zip"? Is there any function to open R
workspace which it store in zip file? I hope some one can give me
advices.
Best, Muhammad Subianto
> version
_
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 2.1
year 2005
month 12
day 20
svn rev 36812
language R>
Hi. R can do all of this for you. See ?save.image and especially the 'compress' argument. /Henrik On 3/29/06, Muhammad Subianto <msubianto at gmail.com> wrote:> Dear R users, > My situation: > (1) I have limited workspace for my work harddisk (about 10 GiB). > (2) I have a lot of data files in R workspace (*.RData) which most of > them > 200 MiB. For some reason I zip some of them, for instance > "filename.RData (250 MiB)" to "filename.zip (3MiB)". In this work I > have a lot of more space of my harddisk. > > Normally, If I want to use "filename.RData" for my experiment, I can > do it with load("filename.RData"). > > Then I tried to open/load > > > load("filename.zip") > Error: bad restore file magic number (file may be corrupted) -- no data loaded > > > > My question: > How can I open/load "filename.zip"? Is there any function to open R > workspace which it store in zip file? I hope some one can give me > advices. > > > Best, Muhammad Subianto > > > version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 2 > minor 2.1 > year 2005 > month 12 > day 20 > svn rev 36812 > language R > > > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > >-- Henrik Bengtsson Mobile: +46 708 909208 (+2h UTC)
On Wed, Mar 29, 2006 at 11:44:03AM +0200, Muhammad Subianto wrote:> How can I open/load "filename.zip"? Is there any function to open R > workspace which it store in zip file?I think you have two options: 1) use zip.file.extract() to unzip the file before loading 2) save your data with save.image(file="foo.RData", compress = True) cu Philipp -- Dr. Philipp Pagel Tel. +49-8161-71 2131 Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186 Technical University of Munich Science Center Weihenstephan 85350 Freising, Germany and Institute for Bioinformatics / MIPS Tel. +49-89-3187 3675 GSF - National Research Center Fax. +49-89-3187 3585 for Environment and Health Ingolst?dter Landstrasse 1 85764 Neuherberg, Germany http://mips.gsf.de/staff/pagel
On Wed, 29 Mar 2006, Muhammad Subianto wrote:> Dear R users, > My situation: > (1) I have limited workspace for my work harddisk (about 10 GiB). > (2) I have a lot of data files in R workspace (*.RData) which most of > them > 200 MiB. For some reason I zip some of them, for instance > "filename.RData (250 MiB)" to "filename.zip (3MiB)". In this work I > have a lot of more space of my harddisk. > > Normally, If I want to use "filename.RData" for my experiment, I can > do it with load("filename.RData").Please try to use the compress=TRUE argument to save(). If you save()ed uncompressed, you have to load uncompressed, unzip first. There are unzipping functions in R too, see ?zip.file.extract.> > Then I tried to open/load > > > load("filename.zip") > Error: bad restore file magic number (file may be corrupted) -- no data loaded > > > > My question: > How can I open/load "filename.zip"? Is there any function to open R > workspace which it store in zip file? I hope some one can give me > advices. > > > Best, Muhammad Subianto > > > version > _ > platform i386-pc-mingw32 > arch i386 > os mingw32 > system i386, mingw32 > status > major 2 > minor 2.1 > year 2005 > month 12 > day 20 > svn rev 36812 > language R > > > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no