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]]
___
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 "..."
"<-" 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
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]]
4 matches
Mail list logo