[R] Enumerate the class of objects

Joshua Wiley jwiley.psych at gmail.com
Sat Jan 21 20:53:28 CET 2012


Here are two options:

sapply(.GlobalEnv, class)
ls.str()

Also, please follow the posting guide and post in plain text.

Cheers,

Josh

On Sat, Jan 21, 2012 at 11:44 AM, Ajay Askoolum <aa2e72e at yahoo.co.uk> wrote:
> ls() gives me the vector of objects in the workspace
> class(objName) gives me the class of objName
>
> class(ls()) just returns character as many times as there are objects.
>
> How do I get a vector of all objects in the workspace?
>        [[alternative HTML version deleted]]

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>
> ______________________________________________
> 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.

-- 
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



More information about the R-help mailing list