How do I make borders in a contingency table built in R?

前端 未结 3 1122
没有蜡笔的小新
没有蜡笔的小新 2021-01-26 10:55

I have made a contingency table in R, shown below:

count <- table (dframe1$Contact, dframe1$Brokenbones)          # create the table

 count                           


        
3条回答
  •  时光说笑
    2021-01-26 11:47

    Using gridExtra, I think it is a good option to create smart table:

    enter image description here

    mm <- matrix(c(235,61,54,32),ncol=2,byrow=TRUE,
            dimnames = list(c("No contact sport", "Contact sport"), 
            c("No broken ankle/leg ", "Broken ankle/leg")))
    library(gridExtra)
    grid.table(mm)
    
    
    library(gridExtra)
    grid.table(mm)
    

提交回复
热议问题