Dear R Scholars Many R users have successfully loaded and used the attached WVS RDATA file into my R program. I would just would like help viewing, editing etc. It is only one line of code to load in. *load('WVS.RData')* I would like help on how to view, edit and save this 2.461 MB RData file. There have been so many questions and answers about this topic but I am at my wits end. I apologize for asking such a basic question. I ave I have tried this command and I cannot even view it, let alone edit the file y <- load('WVS.RData') head(y) thank you for your guidance, Jack
Hi Jason, I assume that you actually have "WVS.RData" in your working directory when you try to load it. Otherwise you will get an error message. If you don't get an error message when you do this: load("WVS.RData") there will be a new object in your workspace. So if you want to see what the object is, try this: objects() load("WVS.RData") objects() Unless you have already run the "load" command, there will be a new object in the list. That is what you're looking for. Say that object is named "x". You can look at the first part of it with: head(x) and maybe do some basic editing with: edit(x) Good luck. Jim
On 7/21/20 9:11 PM, Jason Levy wrote:> Dear R Scholars > Many R users have successfully loaded and used the attached WVS RDATA file > into my R program.You appear to have made a common mistake in assuming that attachments of any sort can be processed by the Rhelp mail-server. Only attachments of type postscript, PDF and plain-text can survive the scrubbing process. It is possible to make an attachment that will hold a faithful representation of R objects using dput or dump, but they must have extension .txt when attached by mail-clients. -- David.> I would just would like help viewing, editing etc. > It is only one line of code to load in. > *load('WVS.RData')* > > I would like help on how to view, edit and save this 2.461 MB RData file. > There have been so many questions and answers about this topic but I am at > my wits end. I apologize for asking such a basic question. I ave > > I have tried this command and I cannot even view it, let alone edit the file > y <- load('WVS.RData') > head(y) > > thank you for your guidance, Jack > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
You may misunderstand how RData files work.? Note that RData files are not necessarily JUST a single variable unless they were explicitly written to store a single variable only. If you save a single variable (a dataframe, for example) named 'mydata' with save(mydata, file = "saveddata.RData") and then load the variable back into a new R session with y? <- load("saveddata.RData"), your data will still be contained in a variable named 'mydata',? not renamed? y. Look at ?load and ?save On 7/22/2020 5:47 AM, Jim Lemon wrote:> Hi Jason, > I assume that you actually have "WVS.RData" in your working directory > when you try to load it. Otherwise you will get an error message. If > you don't get an error message when you do this: > > load("WVS.RData") > > there will be a new object in your workspace. So if you want to see > what the object is, try this: > > objects() > load("WVS.RData") > objects() > > Unless you have already run the "load" command, there will be a new > object in the list. That is what you're looking for. Say that object > is named "x". You can look at the first part of it with: > > head(x) > > and maybe do some basic editing with: > > edit(x) > > Good luck. > > Jim > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.