[R] frequency table across multiple variables

Ralikwen Balazs.Klein at gmail.com
Fri Sep 19 09:58:42 CEST 2008


Dear R users,

I have a dataframe like this:

x1<-c(1,2,3,4,NA ,NA ,NA, 3, 1, 1, 1, 1, 2, 2, 3, 4, 4)
x2<-c(2,3,4,3,4,3,4,2,2,3,4,NA,NA,NA,NA,4,3)
x3<-c(1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,1,2)
m<-data.frame(x1,x2,x3)

I would like to create a frequency table like this:

      x1  x2  x3
NA
1
2
3
4

where the values in each cell would be the count of the value for that
variable.
How can I do this?

Thanks for the help.
Balázs

 
-- 
View this message in context: http://www.nabble.com/frequency-table-across-multiple-variables-tp19567838p19567838.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list