[R] viewing, editing and saving an RDATA file
Robert Baer
rb@er @end|ng |rom @t@u@edu
Wed Jul 22 23:28:47 CEST 2020
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 using 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.
More information about the R-help
mailing list