How to disable “Save workspace image?” prompt in R?

前端 未结 11 1847
迷失自我
迷失自我 2020-11-29 23:51

When I exit the interactive R shell, it displays an annoying prompt every time:

>
>
Save workspace image? [y/n/c]: n

I\'m always answering \"no\" to it

11条回答
  •  一生所求
    2020-11-30 00:21

    Overwrite default option for save argument of quit function

    formals(quit)$save <- formals(q)$save <- "no"
    

    put this line in .Rprofile

    Edit: added q, so there is no prompt no matter which variant is used

提交回复
热议问题