标签: r
我在R中有以下环境:
ee = new.env() ee$a = 1 ee$b = 3 ee$z = 5
清除特定变量按预期工作:
rm("z", envir=ee) ls(ee) # "a", "b"
但为什么清除所有变量都不起作用?
rm(ls(ee), envir=ee) # Error in rm(ls(ee), envir = ee) : # ... must contain names or character strings