简体   繁体   中英

How to access R session/global environment after running script through Rscript on Linux

I am using a Linux Workstation to run my R script. I did so using screen and then Rscript myRscript.R . Is there anyway to access the R session after the script has run? I want to be able to write new commands and access the global environment that was created during that session.

I tried asking the Unix community, but no response... https://unix.stackexchange.com/questions/608073/how-to-pass-code-to-attached-screen

The session is lost after the script is done running. But you can save the environment using save.image("env_file.Rdata") and use it later using load("env_file.Rdata") .

See http://ugrad.stat.ubc.ca/R/library/base/html/save.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM