An alias for rm(list = ls()) for a specified environment. Use with
care.
clear(envir = globalenv())
| envir | an environment from which all objects will be removed. Default
is |
|---|
x <- 1 y <- 2 x <- 3 ls()#> [1] "x" "y"clear()#>ls()#> [1] "x" "y"