[R] using table in R

Sebastian P. Luque spluque at gmail.com
Mon Sep 18 17:47:13 CEST 2006


On Sat, 16 Sep 2006 21:17:21 -0500,
Bingshan Li <bli1 at bcm.tmc.edu> wrote:

> Hi there, I have a dataframe whose elements are numbers or characters. I
> want to extract the frequencies of each elements in the dataframe. For
> example,

> d = as.data.frame(matrix(c(1, 2, 3, 3), 2,2))

Don't use a data frame; e.g.:

table(as.matrix(d))


-- 
Seb



More information about the R-help mailing list