Convert a "table1"-table to pdf-friendly format

I have a table with descriptive statistics I generated using the table1 package (I used it since it can produce descriptive statistics for both categorical and continuous variables). The issue I'm having is that table1 only produce tables in HTML-format. I'd like to transform my table1-table to a kable-table (or equivalent) so I knit my markdown to a pdf-file. I tried the following code library(table1) library(kable) tb <- table1(reformulate(colnames(df)), data=df, output = "latex") kable(tb, caption = "Descriptive statistics") But this produces an empty table looking like this: Does anyone know how to solve this?
Take Your Experience to the Next Level
NewDownload our mobile app for a faster and better experience.
Comments
0U
Join the discussion
Sign in to leave a comment