Re: [R] Trouble loading saved Rdata
The typos were just transcription errors I'' report out the session info On Sat, Aug 14, 2010 at 5:35 PM, Joshua Wiley jwiley.ps...@gmail.comwrote: That worked for me once I properly quoted test.RData on sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 If correcting the quoting does not help you, perhaps you can report the results of sessionInfo() Cheers, Josh On Sat, Aug 14, 2010 at 5:14 PM, steven mosher mosherste...@gmail.com wrote: In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Trouble loading saved Rdata
Did you exit R and then return? fname-test.Rdata full-file.path(Example,fname,fsep=.Platform$file.sep) full [1] Example/test.Rdata load(full) test NULL sessionInfo() R version 2.11.1 (2010-05-31) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.11.1 On Sat, Aug 14, 2010 at 5:35 PM, Joshua Wiley jwiley.ps...@gmail.comwrote: That worked for me once I properly quoted test.RData on sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 If correcting the quoting does not help you, perhaps you can report the results of sessionInfo() Cheers, Josh On Sat, Aug 14, 2010 at 5:14 PM, steven mosher mosherste...@gmail.com wrote: In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Trouble loading saved Rdata
On Aug 15, 2010, at 3:06 AM, steven mosher wrote: Did you exit R and then return? fname-test.Rdata full-file.path(Example,fname,fsep=.Platform$file.sep) full [1] Example/test.Rdata load(full) test NULL I am unable to reproduce the problem (after correcting two different syntactic errors in the initial posting that should have thrown errors and prevented the creation of both test and full . I didn't exit my session and return but I did remove the test object after saving it. My guess is that the test object was not correctly formed at the time it was saved. test-data.frame(a=c(1,2,3),b=c(3,4,5)) save(test,file=full) test a b 1 1 3 2 2 4 3 3 5 full [1] Example/test.Rdata rm(test) load(file=full) test a b 1 1 3 2 2 4 3 3 5 (I pretty much have the same setup that is indicated below running on MacOS 10.5.8.) -- David. sessionInfo() R version 2.11.1 (2010-05-31) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.11.1 On Sat, Aug 14, 2010 at 5:35 PM, Joshua Wiley jwiley.ps...@gmail.comwrote: That worked for me once I properly quoted test.RData on sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 If correcting the quoting does not help you, perhaps you can report the results of sessionInfo() Cheers, Josh On Sat, Aug 14, 2010 at 5:14 PM, steven mosher mosherste...@gmail.com wrote: In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ [[alternative HTML version deleted]] __ R-help@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. David Winsemius, MD West Hartford, CT __ R-help@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.
Re: [R] Trouble loading saved Rdata
Steven, I have exited my R session and restarted and I can load the file without issue. I have also tried loading the saved data on some older versions of R (2.10.1 and 2.11.0) and Windows (XP). Have you tried recreating the test object, ensuring that it is not NULL itself, resaving it, and then see if loading it works better? Josh On Sun, Aug 15, 2010 at 12:06 AM, steven mosher mosherste...@gmail.com wrote: Did you exit R and then return? fname-test.Rdata full-file.path(Example,fname,fsep=.Platform$file.sep) full [1] Example/test.Rdata load(full) test NULL sessionInfo() R version 2.11.1 (2010-05-31) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.11.1 On Sat, Aug 14, 2010 at 5:35 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: That worked for me once I properly quoted test.RData on sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 If correcting the quoting does not help you, perhaps you can report the results of sessionInfo() Cheers, Josh On Sat, Aug 14, 2010 at 5:14 PM, steven mosher mosherste...@gmail.com wrote: In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ __ R-help@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.
Re: [R] Trouble loading saved Rdata
I think it came down to my actual program having a function that saved the objects it was passed with a .RData extension as opposed to .Rdata Rechecking the whole thing. On Sun, Aug 15, 2010 at 11:05 AM, Joshua Wiley jwiley.ps...@gmail.comwrote: Steven, I have exited my R session and restarted and I can load the file without issue. I have also tried loading the saved data on some older versions of R (2.10.1 and 2.11.0) and Windows (XP). Have you tried recreating the test object, ensuring that it is not NULL itself, resaving it, and then see if loading it works better? Josh On Sun, Aug 15, 2010 at 12:06 AM, steven mosher mosherste...@gmail.com wrote: Did you exit R and then return? fname-test.Rdata full-file.path(Example,fname,fsep=.Platform$file.sep) full [1] Example/test.Rdata load(full) test NULL sessionInfo() R version 2.11.1 (2010-05-31) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.11.1 On Sat, Aug 14, 2010 at 5:35 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: That worked for me once I properly quoted test.RData on sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 If correcting the quoting does not help you, perhaps you can report the results of sessionInfo() Cheers, Josh On Sat, Aug 14, 2010 at 5:14 PM, steven mosher mosherste...@gmail.com wrote: In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Trouble loading saved Rdata
During my session I write several .Rdata objects to a variety of subdirectories so replicating the exact problem wasnt very easy. In the actual program all the files get written. all the files have sizes that fit the amount of data in them. It looks like the problem was naming the files .RData as opposed to .Rdata since there was one function that named all the files before saving, it kinda messed up the program and my ability to replicate the problem. Seems to be working now Thanks On Sun, Aug 15, 2010 at 6:44 AM, David Winsemius dwinsem...@comcast.netwrote: On Aug 15, 2010, at 3:06 AM, steven mosher wrote: Did you exit R and then return? fname-test.Rdata full-file.path(Example,fname,fsep=.Platform$file.sep) full [1] Example/test.Rdata load(full) test NULL I am unable to reproduce the problem (after correcting two different syntactic errors in the initial posting that should have thrown errors and prevented the creation of both test and full . I didn't exit my session and return but I did remove the test object after saving it. My guess is that the test object was not correctly formed at the time it was saved. test-data.frame(a=c(1,2,3),b=c(3,4,5)) save(test,file=full) test a b 1 1 3 2 2 4 3 3 5 full [1] Example/test.Rdata rm(test) load(file=full) test a b 1 1 3 2 2 4 3 3 5 (I pretty much have the same setup that is indicated below running on MacOS 10.5.8.) -- David. sessionInfo() R version 2.11.1 (2010-05-31) x86_64-apple-darwin9.8.0 locale: [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] tools_2.11.1 On Sat, Aug 14, 2010 at 5:35 PM, Joshua Wiley jwiley.ps...@gmail.com wrote: That worked for me once I properly quoted test.RData on sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 If correcting the quoting does not help you, perhaps you can report the results of sessionInfo() Cheers, Josh On Sat, Aug 14, 2010 at 5:14 PM, steven mosher mosherste...@gmail.com wrote: In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ [[alternative HTML version deleted]] __ R-help@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. David Winsemius, MD West Hartford, CT [[alternative HTML version deleted]] __ R-help@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.
[R] Trouble loading saved Rdata
In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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.
Re: [R] Trouble loading saved Rdata
That worked for me once I properly quoted test.RData on sessionInfo() R version 2.11.1 (2010-05-31) x86_64-pc-mingw32 locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 If correcting the quoting does not help you, perhaps you can report the results of sessionInfo() Cheers, Josh On Sat, Aug 14, 2010 at 5:14 PM, steven mosher mosherste...@gmail.com wrote: In the particular application I have I save test.Rdata to a sub directory dir-Example dir.create(dir) test-data.frame(a=c(1,2,3),b=c(3,4,5) full-file.path(dir,test.Rdata,fsep=.Platform$file.sep) save(test,file=full) load(full) returns NULL it works fine when the object is saved to the working directory, but fails when saved to a sub directory. The Rdata is there. Bytes are in it. but loading it doesnt work. [[alternative HTML version deleted]] __ R-help@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. -- Joshua Wiley Ph.D. Student, Health Psychology University of California, Los Angeles http://www.joshuawiley.com/ __ R-help@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.