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.

4
  • 5
    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)' Commented Apr 27, 2023 at 8:16
  • 6
    It is a known issue, you need to install patched version from github: github.com/haozhu233/kableExtra/issues/750 Commented Apr 27, 2023 at 8:19
  • 15
    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. Commented Apr 27, 2023 at 8:20
  • If installing dev patch does not work, then remove pdf from YAML output: html_document: default pdf_document: default Commented Oct 3, 2023 at 11:00

1 Answer 1

20

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

Sign up to request clarification or add additional context in comments.

1 Comment

(noting also need to install devtools for us n00bs) install.packages("devtools")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.