开发者

Retrieving Workspace in R

开发者 https://www.devze.com 2023-03-26 13:44 出处:网络
I am working with开发者_开发问答 R on Ubuntu. When I was working I accidentally hit Ctrl-Z and

I am working with开发者_开发问答 R on Ubuntu. When I was working I accidentally hit Ctrl-Z and it kicked me out of the workspace and I did not save my variables. Is there anyway to retrieve my old workspace?

Thank you.


Jump back into the still-running session via

  fg 

i.e. bring the R session you suspended via Ctrl-Z back to the foreground.


Reconnect and try "jobs" from the terminal to see if the R process is still there. If so, fg should do the trick as @Dirk said (if you have more than 1 suspended jobs, fg %2 would bring back the second one etc).

As far as I know, if you actually terminate the R session and did not save your workspace, it is lost - sorry. S-PLUS would save all variables in your workspace directory as you generated them, but R keeps everything in memory until you explicitly save your workspace - typically at exit, but save.image() can do it mid-session.

/Tommy

0

精彩评论

暂无评论...
验证码 换一张
取 消