Error when loading kableExtra in markdown file after updating to R 4.3.0
Asked Answered
M

1

19

After updating to R 4.3.0 (on macOS 13.3.1) I get an error message, when compiling a markdown document:

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)'
Execution halted

Running the individual chunks in R Studio works without error message.

I already re-installed kableExtra with all dependencies.

Marcellmarcella answered 27/4, 2023 at 8:13 Comment(4)
According to the R news Calling && or || with LHS or (if evaluated) RHS of length greater than one is now always an error, with a report of the form 'length = 4' in coercion to 'logical(1)'Rascally
It is a known issue, you need to install patched version from github: github.com/haozhu233/kableExtra/issues/750Ebeneser
Your "output" section of the YAML for your document includes 3 entries. Reduce it to one entry and you'll work around the bug in kableExtra.Tseng
If installing dev patch does not work, then remove pdf from YAML output: html_document: default pdf_document: defaultStearoptene
H
20

To install the patched version from zx8754's answer above: devtools::install_github("kupietz/kableExtra")

Hirohito answered 19/5, 2023 at 0:6 Comment(1)
(noting also need to install devtools for us n00bs) install.packages("devtools")Boron

© 2022 - 2024 — McMap. All rights reserved.