r - .Last() in .RProfile doesn't execute -


i'm trying make r restart on quit, i'm using .last in .rprofile. solution modified quit , restart clean r session within r?, , i've tried other solutions in answer no avail. .first() works fine, when q() @ end, prompts "save workspace image?" , after answering, insta-closes

.last <- function() {  print("new r in 3 seconds") sys.sleep(3)  system("r --no-save")  print("close r in 3 seconds")  sys.sleep(3) } print("test") 

(the print @ end because there's hidden "feature" .rprofile ignores last line if theres no newline, know shouldn't execute that.)


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -