Crosstab with multiple items

前端 未结 7 968
天命终不由人
天命终不由人 2021-02-01 10:48

In SPSS, it is (relatively) easy to create a cross tab with multiple variables using the factors (or values) as the table heading. So, something like the following (made up dat

7条回答
  •  迷失自我
    2021-02-01 10:56

    You could use a custom function to use rbind() on several tables, something like this:

    multitab <- function(...){
       tabs<-list(...)
       tablist<-lapply(tabs,table)
       bigtab<-t(sapply(tablist,rbind))
       bigtab } 
    

提交回复
热议问题