Skip to content
Prev 170143 / 398506 Next

How to apply table() on subdata and stack outputs

Sean Zhang wrote:
I'd simply use

   table(input.df)

or perhaps closer to the result you want:

  reshape(as.data.frame(table(input.df)), direction="wide",
          timevar="var_interest")


Uwe Ligges