Restart an R session in rstudio *without* reloading environment

I would like to use a command in the R REPL to restart R, since rm(list = ls()) can have unexpected behavior, I was hoping for an easy alternative.

but as people have reported on github, rstudioapi::restartSession() reloads the environment, which is not what I want.

Any recommendations for what to use?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.