PDF 출력에 kableExtra를 사용하면 테이블이 아름답게 렌더링되지만 프로그램에 다른 kable 테이블이 없으면 오류가 발생합니다. 다른 사람이이 동작을 보았습니까? 파일이 잘 뜨개질하는 것처럼 보이지만 판도크에서 오류가 발생합니다. 예를 들어kableExtra는 프레젠테이션에 다른 테이블이있는 경우에만 작동합니까?
,이 코드 :
---
output:
beamer_presentation:
fontsize: 10pt
---
```{r global_options, include=FALSE}
library(rmarkdown)
library(knitr)
library(kableExtra)
```
### Slide with table
```{r echo=FALSE, warning=FALSE, message=FALSE}
df=mtcars[1:8,1:3]
kable(df,format="latex",booktabs=T,row.names=F) %>%
row_spec(6, color = "red")
```
이 오류를
processing file: t.rmd
List of 1
$ include: logi FALSE
|....................................... | 60%
ordinary text without R code
|.................................................... | 80%
label: unnamed-chunk-1 (with options)
List of 3
$ echo : logi FALSE
$ warning: logi FALSE
$ message: logi FALSE
|.................................................................| 100%
ordinary text without R code
"C:/PROGRA~2/Pandoc/pandoc" +RTS -K512m -RTS t.utf8.md --to beamer --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output t.pdf --highlight-style tango --latex-engine pdflatex
output file: t.knit.md
! Undefined control sequence.
\[email protected] ...in {tabular}{rrr} \toprule
mpg & cyl & disp\\ \midrul...
l.86 \end{frame}
pandoc.exe: Error producing PDF
Error: pandoc document conversion failed with error 43
In addition: Warning message:
running command '"C:/PROGRA~2/Pandoc/pandoc" +RTS -K512m -RTS t.utf8.md --to beamer --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output t.pdf --highlight-style tango --latex-engine pdflatex' had status 43
Execution halted
를 제공하지만 더미 테이블 또 하나 개의 슬라이드를 추가하는 경우, 그것은 아름답게 인쇄 :
---
output:
beamer_presentation:
fontsize: 10pt
---
```{r global_options, include=FALSE}
library(rmarkdown)
library(knitr)
library(kableExtra)
```
### Slide with table
```{r echo=FALSE, warning=FALSE, message=FALSE}
df=mtcars[1:8,1:3]
kable(df,format="latex",booktabs=T,row.names=F) %>%
row_spec(6, color = "red")
```
### Non-kableExtra table needed for some reason?
```{r echo=FALSE}
kable(df)
```
누구도이 동작을 보았습니까? "마지막 슬라이드로 더미 테이블을 넣는 것"이외의 해결 방법은 무엇입니까?