-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
@christophergandrud Hi, I'm struggling to knit a 3-way frequency table with row probabilities. I thought I could use the kable function.
This is the code of my table:
`## 3-Way Frequency Table
Gender, income and Spouse Work Status (row probabilities)
ge_sp_ca1 <- table(z$sexcat[z$educat==4 & z$married==1],
z$income_status[z$educat==4 & z$married==1],
z$spwrkcat[z$educat==4 & z$married==1])
ftable(prop.table(ge_sp_ca1, c(1,2)))`
Which yields the following output:

I thought I could use a simple kable command to knit it but it produces a completely wrong table:
knitr::kable(ftable(prop.table(ge_sp_ca,c(1,2))), caption = "Gender and Spouse Work Status",digits = 2)
Any ideas how to fix this?
Thanks a lot!
Philipp
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
