在 RMarkdown 上渲染为 PDF 就在我加载包的第一个代码块处停止:
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
library(tidyverse)
library(haven)
library(binom)
library(ggplot2)
library(DescTools)
library(emmeans)
library(tableone)
library(kableExtra)
我收到此错误:
processing file: Exercise1_Chiodo.Rmd
|... | 6% [setup]
Quitting from lines 14-26 [setup] (Exercise1_Chiodo.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:
1. base::library(kableExtra)
2. base::tryCatch(...)
3. base (local) tryCatchList(expr, classes, parentenv, handlers)
4. base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
5. value[[3L]](cond)
Execution halted
当我删除库(kableExtra)时它起作用(但当然会在我的 kable 表处停止)。我可能做错了什么?我尝试更新软件包,但仍然遇到同样的错误。
devtools::install_github("kupietz/kableExtra") 成功了!