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
Post a Comment