I have an R markdown file that uses the kableExtra package. If I execute the code in a console window in RStudio, it works fine. If I instead press the "knit" button to produce an HTML file, it throws the following error:
Quitting from lines 295-303 [loaddata] (912-mss-jbi.Rmd)
Error:
! package or namespace load failed for 'kableExtra':
.onLoad failed in loadNamespace() for 'kableExtra', details:
call: !is.null(rmarkdown::metadata$output) && rmarkdown::metadata$output %in%
error: 'length = 3' in coercion to 'logical(1)'
Backtrace:
- base::library(kableExtra)
- base::tryCatch(...)
- base (local) tryCatchList(expr, classes, parentenv, handlers)
- base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
- value[3L]
Execution halted
I am running version 2023.06.1 Build 524 of RStudio, with R version 4.3.1, and kableExtra version kableExtra_1.3.4.