How do I tabulate across an entire R data frame?

后端 未结 2 1941
自闭症患者
自闭症患者 2020-12-22 03:52

I\'ve got a data frame containing, say, the columns v1, v2, ..., v30 which contain the same factor variables, although the levels are different from column to c

相关标签:
2条回答
  • 2020-12-22 04:22

    One approach is

    library(plyr)
    llply(.data=df, .fun=table)
    
    0 讨论(0)
  • 2020-12-22 04:34

    Here is one approach to do this

    table(unlist(df))
    
    0 讨论(0)
提交回复
热议问题