.rs.restartR()
can be used to restart the R session. But it only seems to work from within RStudio.
When it's run elsewhere:
.rs.restartR()
Error in .rs.restartR() : could not find function ".rs.restartR"
How can the R session be restarted in other environments? I happen to be operating from a highly constrained cloud environment, so I am limited in what I can do (so things like ctrl + shift + f10) are out of the question