In VS Code, how to clean restart R?
CodePudding user response:
You can use system("R")
to restart R without any package loaded and variable in the workspace.
library(dplyr)
d = tibble(1)
## A tibble: 1 × 1
# `1`
# <dbl>
#1 1
system("R")
> d
Error: object 'd' not found
> mutate
Error: object 'mutate' not found