Skip to content
Back to formatted view

Raw Message

Message-ID: <72856D72-D960-48ED-AA77-ABD353548C08@auckland.ac.nz>
Date: 2008-03-19T03:44:46Z
From: Rolf Turner
Subject: ls() and classes
In-Reply-To: <7acc7a990803182039j11ec867bp82f66656de66496b@mail.gmail.com>

On 19/03/2008, at 4:39 PM, Erin Hodgess wrote:

> Dear R People:
>
> I want to get the class of all of the objects in my directory.
>
> I was trying:
>
> do.call(class,list=ls())
>
> but got an "unused argument error".
>
> I'm sure it's simple, but I'm just not seeing it.
>
> Any help would be much appreciated.
>
> Sincerely,
> Erin

Too easy!!!

sapply(ls(),function(x){class(get(x))})


	cheers,

		Rolf

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}