If I uncomment kableExtra
library the Word output becomes wrongly formatted but html
output is always right. Is kableExtra
compatible with knitting to Word?
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(knitr)
#library(kableExtra)
library(janitor)
MT <- tibble(Session = c(1,1,1,1,1,1,2,2,2,2),
scores = rep('Not', 10),
B_A = rep('A', 10))
t <- MT %>%
tabyl(Session, scores, B_A, show_missing_levels = FALSE) %>%
adorn_totals(where = "col")
kable(t)
kableExtra
doesn't seem to be compatible with Word output, you may try other alternatives. Example - flextable::regulartable
```{r}
MT <- tibble(Session = c(1,1,1,1,1,1,2,2,2,2),
scores = rep('Not', 10),
B_A = rep('A', 10))
t <- MT %>%
tabyl(Session, scores, B_A, show_missing_levels = FALSE) %>%
adorn_totals(where = "col")
flextable::regulartable(t$A)