I\'m trying to call a simple python script from within R using system2(). I\'ve read some information I found vague that said if \'too much\' memory is used, it won\'t work.
RStudio has this undocumented rs.restartR() which is supposed to do just that: restarting R.
However, it does not unload the packages that were loaded, nor does it clean the environment, so that I have some doubts about if it restarts R at all.