Skip to content
Prev 278366 / 398506 Next

Frequency table

I think something like this is what you are looking for, but to be
honest, I don't quite understand what you are looking for: can you
actually write out the desired result:

tapply(df$x, df$Var, table)

where df is the name of your data.

df <- structure(list(Var = c(201L, 201L, 201L, 201L, 202L, 202L, 202L,
202L, 203L, 203L, 203L, 203L), rep = c(1L, 2L, 3L, 4L, 1L, 2L,
3L, 4L, 1L, 2L, 3L, 3L), x = c(1L, 3L, 3L, 3L, 1L, 1L, 3L, 5L,
2L, 2L, 3L, 3L)), .Names = c("Var", "rep", "x"), class = "data.frame",
row.names = c(NA,
-12L))

Michael
On Wed, Nov 23, 2011 at 4:07 PM, reynaldo_ns <reynaldo_ns at hotmail.com> wrote: