Skip to content
Prev 285865 / 398502 Next

Confused: Inconsistent result?

Short answer, environments -- ls() looks (by default) in its current
environment, which is not the same as the global environment when
being called inside a function.

This would (I think) give the same answer but I haven't checked it. :
+ xyz<-as.vector(c(ls(.GlobalEnv),as.matrix(lapply(ls(),class))));
+ dim(xyz)<-c(length(xyz)/2,2);
+ return(xyz)
+ }
On Mon, Feb 20, 2012 at 10:07 AM, Ajay Askoolum <aa2e72e at yahoo.co.uk> wrote: