[R] loading .rda file

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Tue Aug 30 18:36:05 CEST 2016

You cannot. However, you can load the file into a dedicated environment to keep those names separated from your global environment. e.g. [1]

The saveRDS/loadRDS functions are an alternative handle one object at a time without dragging the object names into the picture (you have to name the re-loaded object).

However, the best approach is to write scripts that pull directly from your source (non-R) data files. This makes your work process reproducible as you develop it.

[1] https://stat.ethz.ch/pipermail/r-help/2016-August/441078.html
Sent from my phone. Please excuse my brevity.

On August 30, 2016 7:37:24 AM PDT, Leslie Rutkowski <leslie.rutkowski at gmail.com> wrote:
>I'm slowly migrating from SAS to R and - for the very first time - I'm
>working with a native .Rda data file (rather than importing data from
>sources). When I load this .Rda file into the global environment using
>load("file path") I see a data.frame in the global environment called
>"mydata" that corresponds to the .rda file.
>My question: how can I change the name of this data.frame to something
>my choosing?
>Thanks for considering this very simple question.
>	[[alternative HTML version deleted]]
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list