remove variable environment r code example
Example 1: r clean environment
rm(list = ls())
Example 2: uninstall R
sudo apt-get remove r-base r-base-core
Example 3: linear model remove variables in R
lm(y ~ . - age - weight, data=mydata)
rm(list = ls())
sudo apt-get remove r-base r-base-core
lm(y ~ . - age - weight, data=mydata)