Old Kable format from 2022 How Do I Update?

39 Views Asked by At

I have the format set up for KableExtra from early 2023 but tried to run it today and it does not work. It is the Kable_Styling that is having problems

'''{r}
home_hitw %>%
  kable() %>%
  kable_styling("striped", "hover", full_width=F,fixed_thead = T) %>%
  scroll_box(width = "1000px", height = "500px")
'''

I looked online to see how to update but every time i tried the data never showed up.

1

There are 1 best solutions below

1
nrennie On

The options for "striped" and "hover" should be in a vector passed to the bootstrap_options argument, rather than passed in as separate arguments to kabel_styling(). For example:

library(dplyr)
library(kableExtra)

mtcars %>%
  kable() %>%
  kable_styling(
    bootstrap_options = c("striped", "hover"),
    full_width = F, fixed_thead = T
  ) %>%
  scroll_box(width = "1000px", height = "500px")