[R] viewing, editing and saving an RDATA file

Bert Gunter bgunter@4567 @end|ng |rom gm@||@com
Thu Jul 23 01:37:15 CEST 2020


Inline

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Wed, Jul 22, 2020 at 2:29 PM Robert Baer <rbaer using atsu.edu> wrote:

> 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.
>

Yes indeedy. In fact, y will be:
Value

A character vector of the names of objects created, invisibly.

>
> Look at ?load and ?save
>

Which should have been the OP's first port of call....

>
> 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.
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list