Load previous saved workspace image in RStudio




While closing RStudio, it asks for saving the workspace image. I choose yes always. But when I restart RStudio, I am never able to recover and use the commands I used in the previous session. What exactly does RStudio save in the form of workspace image and is there a way to recover previous session’s commands into the current session and use them directly using the up arrow keys like in a normal session?




The workspace is your current R working environment and includes any user-defined objects (vectors, matrices, data frames, lists, functions). At the end of an R session, the user can save an image of the current workspace that is automatically reloaded the next time R is started.

save the workspace to the file .RData in the cwd


save specific objects to a file

if you don’t specify the path, the cwd is assumed

save(object list,file=“myfile.RData”)

load a workspace into the current session

if you don’t specify the path, the cwd is assumed