The help file for load says that it is to be used for objects saved using the save command. Perhaps you should try read.table. Cheers, Simon. Abd Rahman Kassim wrote:> Dear All, > > > I'm trying to save a dataframe using write.table command. It works, but when I retrieved, there's an error message as shown below: > > >> write.table(soil.dat,file="C:/soil.rdata") >> load("C:/soil.rdata") >> > Error: bad restore file magic number (file may be corrupted)-- no data loaded > > > I can figure out the error message. Any assistance to solve the problem is very much appreciated. > > Regards. > > Abd. Rahman Kassim, PhD > Forest Management & Ecology Program > Forestry & Conservation Division > Forest Research Institute Malaysia > Kepong 52109 Selangor > Malaysia > > Fax: 603-62729852 > Tel: 603-62797179 > > > > ***************************************** > > > ***************************************** > [[alternative HTML version deleted]] > > ______________________________________________ > 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 > >-- Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat. Centre for Resource and Environmental Studies The Australian National University Canberra ACT 0200 Australia T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au F: +61 2 6125 0757 CRICOS Provider # 00120C
Dear All, I'm trying to save a dataframe using write.table command. It works, but when I retrieved, there's an error message as shown below:> write.table(soil.dat,file="C:/soil.rdata") > load("C:/soil.rdata")Error: bad restore file magic number (file may be corrupted)-- no data loaded I can figure out the error message. Any assistance to solve the problem is very much appreciated. Regards. Abd. Rahman Kassim, PhD Forest Management & Ecology Program Forestry & Conservation Division Forest Research Institute Malaysia Kepong 52109 Selangor Malaysia Fax: 603-62729852 Tel: 603-62797179 ***************************************** ***************************************** [[alternative HTML version deleted]]
Dear Alexander, Thanks for the useful information. ARK ----- Original Message ----- From: "Alexander Nervedi" <alexnerdy at hotmail.com> To: <rahmank at frim.gov.my> Sent: Tuesday, March 28, 2006 7:19 PM Subject: RE: [R] write.table command> > Hi! > > Either use write.table() to output a data matrix and read.table() to > retrieve it .. or use save(obj,...) to save R object and then use load to > call it back into an R session. > > check out the help on both > ?read.table > ?save > > hope that helps > > ul-nadi. > > >>From: "Abd Rahman Kassim" <rahmank at frim.gov.my> >>To: <r-help at stat.math.ethz.ch> >>Subject: [R] write.table command >>Date: Wed, 29 Mar 2006 08:43:16 -0800 >> >> >>Dear All, >> >> >>I'm trying to save a dataframe using write.table command. It works, but >>when I retrieved, there's an error message as shown below: >> >> > write.table(soil.dat,file="C:/soil.rdata") >> > load("C:/soil.rdata") >>Error: bad restore file magic number (file may be corrupted)-- no data >>loaded >> >> >>I can figure out the error message. Any assistance to solve the problem is >>very much appreciated. >> >>Regards. >> >>Abd. Rahman Kassim, PhD >>Forest Management & Ecology Program >>Forestry & Conservation Division >>Forest Research Institute Malaysia >>Kepong 52109 Selangor >>Malaysia >> >>Fax: 603-62729852 >>Tel: 603-62797179 >> >> >> >>***************************************** >> >> >>***************************************** >> [[alternative HTML version deleted]] >> >>______________________________________________ >>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 > > _________________________________________________________________> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > ***************************************** > Outgoing mail is certified Virus Free. > Checked by TrendMicro Interscan Messaging Security. > For any enquiries, please contact FRIM IT Department. > *****************************************