[R] sequencial frequency table
Mauricio Cardeal
mcardeal at ufba.br
Tue Jan 30 14:03:43 CET 2007
Hi.
I have the data frame xyz below and I´d like to perform a sequencial
frequency table using some unique function instead of making 3 different
one-by-one table (table x, table y and table z). But I´can´t figure out
the correct way.
x <- c(2,3,2,4)
y <- c(3,1,1,1)
z <- c(4,2,1,4)
xyz <- as.data.frame(cbind(x,y,z))
freq <- function(x){
table(x)
}
freq(xyz)
Thank you,
Mauricio
More information about the R-help
mailing list