Skip to content
Prev 315483 / 398503 Next

RESOLVED: Using table to get frequencies of several factors at once

Thanks, 
I hereby declare this thread as resolved.

-----Original Message-----
From: S Ellison [mailto:S.Ellison at LGCGroup.com] 
Sent: Wednesday, January 16, 2013 4:27 PM
To: Pancho Mulongeni; R help
Subject: RE: Using table to get frequencies of several factors at once

You could use a variant of apply(), probably sapply

For example
d <- as.data.frame( matrix(sample(0:1, 200, replace=TRUE), ncol=5))

head(d)

sapply(d, table)

S Ellison
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:9}}
Message-ID: <9EA364B2FAFC264A86CED5A4404A19DB3F2BAD22@DB3PRD0311MB429.eurprd03.prod.outlook.com>
In-Reply-To: <A4E5A0B016B8CB41A485FC629B633CED4A333618D1@GOLD.corp.lgc-group.com>