Skip to content
Prev 315233 / 398503 Next

Using table to get frequencies of several factors at once

Yes thank you, that worked.

-----Original Message-----
From: John Kane [mailto:jrkrideau at inbox.com] 
Sent: Friday, January 11, 2013 4:23 PM
To: Pancho Mulongeni; R help
Subject: RE: [R] Using table to get frequencies of several factors at once

Does something like this do what you want?  It returns a list of tables

md  <-  data.frame((matrix(sample(1:5, 100, replace = TRUE),nrow= 10)))
  str(md)
  apply(md, 2, table)

John Kane
Kingston ON Canada
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium