how to clear environment in r code example
Example 1: r remove all environment
rm(list = ls())
Example 2: r clean environment
rm(list = ls())
Example 3: remove everything in r
#in R
rm(list=ls())
Example 4: how to clear rstudio environment
click on the brush icon in environment tab