微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

尝试使用RMarkdown / kable编织pdf时\ noalign错误放置

如何解决尝试使用RMarkdown / kable编织pdf时\ noalign错误放置

我正在尝试编织pdf,在其中我将数据帧列表打印为pdf。我有以下代码,给我以下错误

---
geometry: margin=1.7cm
output:
  pdf_document:
    fig_caption: yes
    fig_height: 3.5
    fig_width: 6.4
    keep_tex: yes
knit: (function(inputFile,encoding) { rmarkdown::render(inputFile,encoding = encoding,output_file=paste0('IIDP Data Dictionary ',Sys.Date(),'.pdf')) })
---
\clearpage
\tableofcontents
{r setup,include=FALSE}
library(knitr)
library(kableExtra)
options(tinytex.verbose = TRUE)
opts_chunk$set(echo = FALSE,fig.align='center',message=FALSE)
source("H:/IU_DataManagement/Data_Dict_Code_IIDP_20201104.R")
\newpage
\begin{center}
\section{Demographic Variables}
\end{center}
{r,results = "asis",echo = FALSE}
## tables
for(i in seq_along(demo)) {
  print(
      kable(demo[[i]],format = "latex",caption = names(demo)[i],longtable = TRUE,col.names = NULL) %>%
          kable_styling(font_size = 7,latex_options = "repeat_header",full_width = FALSE)
  )
}
### There are 19 other for loops that use the same format but a different list.

我收到的错误,不知道是什么意思:

! \ noalign放错位置。 \ hline-> \ noalign {\ ifnum 0 =`} \ fi \ let \ hskip \ vskip \ let \ vrule \ hrule \ let ... l.15724 348} \ textbackslash {} \ hline 453&变量名称

错误:LaTeX无法编译IIDP数据字典2020-11-05.tex。有关调试提示,请参见https://yihui.org/tinytex/r/#debugging。有关更多信息,请参见IIDP数据字典2020-11-05.log。 执行停止

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。