[R] how to view and edit this RData file

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Wed Jul 22 11:42:48 CEST 2020


On Tue, 21 Jul 2020 21:35:49 -1000
Jason Levy <lev7379 using gmail.com> wrote:

> I would like help on how to view, edit and save this 2.461 MB RData
> file.

Check out the envir= argument to load() and save() if you want to
isolate the loaded data from the rest of the session.

For an example:

# create an environment to load the .rda into...
dataenv <- new.env(parent = emptyenv())
load('data.rda', envir = dataenv) # ...and load it there
ls(dataenv) # see what was inside the .rda file
dataenv$z <- volcano # edit the contents of the environment
# save the contents of the environment to an .rda file
save(list = ls(dataenv), file = 'data.rda', envir = dataenv)

-- 
Best regards,
Ivan



More information about the R-help mailing list