[R] rm(list<-ls()) error

2009-11-05 Thread Feng Li
Dear R, Why rm(list<-ls()) gives an error but rm(list=ls()) not?. I remember the operator ‘<-’ can be used anywhere... Thanks! Feng -- Feng Li Department of Statistics Stockholm University 106 91 Stockholm, Sweden http://feng.li/ [[alternative HTML version deleted]] ___

Re: [R] rm(list<-ls()) error

2009-11-05 Thread Uwe Ligges
Feng Li wrote: Dear R, Why rm(list<-ls()) gives an error but rm(list=ls()) not? I remember the operator ‘<-’ can be used anywhere... Yes, and it means that you make an assignment once passed to the first argument "..." in rm() and evaluated. Well, it is just never evaluated since "..."

Re: [R] rm(list<-ls()) error

2009-11-05 Thread Tony Plate
"<-" and "=" are not universally interchangable. args(rm) function (..., list = character(0L), pos = -1, envir = as.environment(pos), inherits = FALSE) The call rm(list <- ls()) assigns the result of ls() to the variable 'list' and passes that value as an anonymous argument to rm() (Pr

[R] rm(list<-ls()) error

2009-11-05 Thread Feng Li
Dear R, Why rm(list<-ls()) gives an error but rm(list=ls()) not? I remember the operator ‘<-’ can be used anywhere... Thanks! Feng -- Feng Li Department of Statistics Stockholm University 106 91 Stockholm, Sweden http://feng.li/ [[alternative HTML version deleted]]