[R] Clear all with/without function()

baptiste auguie ba208 at exeter.ac.uk
Wed Apr 8 12:38:46 CEST 2009


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




More information about the R-help mailing list