eaglefreeman eaglefreeman - 9 days ago 7
R Question

In R, is it possible to save the current workspace without quitting?

I want to save an image of the workspace in the .RData file but without exiting the current session. Something like

q('yes')
but without quitting.

Answer

You can use save.image() at any time to save all environment data into an .RData file:

save.image(file='yoursession.RData')

To load this data later you can use:

load('yoursession.RData')