Taraxacum88 wrote:
why
rm(list=ls(all=TRUE),envir=globalenv())
is ok but
ca<-function() rm(list=ls(all=TRUE),envir=globalenv())
ca()
does not work?
ls(all=TRUE) from within your function lists all local variables, not
globals. You need envir=globalenv() there too.
Duncan Murdoch
clr <-
function ()
rm(list = ls(pos = .GlobalEnv), pos = .GlobalEnv)
this works for me
HTH,
baptiste
On 8 Apr 2009, at 10:50, Taraxacum88 wrote:
why
rm(list=ls(all=TRUE),envir=globalenv())
is ok but
ca<-function() rm(list=ls(all=TRUE),envir=globalenv())
ca()
does not work?
Thank yo
why
rm(list=ls(all=TRUE),envir=globalenv())
is ok but
ca<-function() rm(list=ls(all=TRUE),envir=globalenv())
ca()
does not work?
Thank you!
v
--
View this message in context:
http://www.nabble.com/Clear-all-with-without-function%28%29-tp22947021p22947021.html
Sent from the R help mailin
3 matches
Mail list logo