Friday, 7 August 2015

R : Remove all objects other than functions


rm(list = setdiff(ls(), lsf.str()))” command is used to remove all objects other than functions.

> ls()
[1] "clc"         "firstName"   "lasyName"    "name"        "revenue"     "revenueChar"
> 
> rm(list = setdiff(ls(), lsf.str()))
> 
> ls()
[1] "clc"


Prevoius                                                 Next                                                

No comments:

Post a Comment