[R] ls() and classes

Benilton Carvalho bcarvalh at jhsph.edu
Wed Mar 19 04:49:49 CET 2008


On Mar 18, 2008, at 11:44 PM, Rolf Turner wrote:
>
> On 19/03/2008, at 4:39 PM, Erin Hodgess wrote:
>
>> do.call(class,list=ls())
>
> sapply(ls(),function(x){class(get(x))})

or, in case you want to save some typing:

eapply(globalenv(), class)

b


More information about the R-help mailing list