I updated my R today to R version 4.3.0 (2023-04-21) and R studio 2023.03.1+446. All of a sudden I can't run rmd script which previously had no issues.
Library (knitr, kableExtra)
df %>%
tabyl(milk, show_na=FALSE) %>%
rename(" " = "milk", "Freq" = "n", "%" = "percent") %>%
adorn_totals("row") %>%
adorn_pct_formatting(affix_sign = FALSE) %>%
knitr::kable(
format = "latex",
align = "l",
linesep = "") %>%
kableExtra::kable_styling(
position = "left",
latex_options = c("striped", "repeat_header"),
stripe_color = "gray!15") %>%
row_spec(0, bold = TRUE)
Errors:
Error in `row_spec()`:
! could not find function "row_spec"
Then I removed row_spec from the code. Error again:
Error:
! .onLoad failed in loadNamespace() for 'kableExtra', details:
call: !is.null(rmarkdown::metadata$output) && rmarkdown::metadata$output %in%
error: 'length = 2' in coercion to 'logical(1)'
Backtrace:
1. ... %>% ...
2. base::loadNamespace(x)
3. base (local) runHook(".onLoad", env, package.lib, package)
Execution halted
What do these errors mean?
I haven't provided any dummy data because I think this might be an issue related to the R packages and R version, but happy to add data if necessary.