I have struggle creating a simple nice looking cross tabulation for a PDF knitted R Markdown document. I have a data set that is similar to this example:
library(tidyverse)
fakeData <- tibble(id = c(1,2,3,4,5,6,7,8,9,10),
bmi = c("normal", "overweighted", "underweighted", "normal", "normal", "overweighted",
"normal", "overweighted", "underweighted","normal"),
gender = c("M", "F", "M", "M", "F", "F", "M", "F", "F", "F"))
I want to get an output like this one:
Have anyone a trick/ a known good package to do this? Thanks a lot!