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 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 mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
_____________________________
Baptiste Augui?
School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK
Phone: +44 1392 264187
http://newton.ex.ac.uk/research/emag