2
pander (+ knitr)에서 재현 할 수있는 오류가 있습니다 : 캡션과 플롯이있는 테이블을 직접 서로에게 PDF 파일을 만들 수 없습니다. 나는 pander 0.5.1, knitr 1.7, R version 3.1.1, Miktex + RStudio를 사용한다.Pander + Knitr을 사용하여 PDf 파일을 만드는 데 문제가 있습니다. 캡션과 플롯이있는 테이블을 서로 바로 옆에 놓을 때 오류가 발생했습니다.
그래서 다음은 오류가 발생합니다 (또한 오류 및 아래 비 오류의 내 목록 참조)
```{r, echo=FALSE, eval=TRUE}
pander(cor(cars), caption="Whatever") # or some other captioned table
hist(cars$speed) #or some other plot
```
pandoc.exe: Error producing PDF from TeX source Fehler: pandoc document conversion failed with error 43 Zus�tzlich: Warnmeldung: Ausf�hrung von Kommando '"C:/Program Files/RStudio/bin/pandoc/pandoc" Teste_markdown_Cor+Hist.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures
--output Teste_markdown_Cor+Hist.pdf --template "C:\Users\jbothe\Documents\R\win-library\3.1\rmarkdown\rmd\latex\default.tex"
--highlight-style tango --latex-engine pdflatex --variable "geometry:margin=1in"' ergab Status 43 Ausf�hrung angehalten
내가 수동으로 & 판더의 출력을 붙여 복사, 문제는 함께있을 것 같다 플롯하기 전에 빈 줄 :
않아요 일 : 오류없이
--------------------------
speed dist
----------- ------- ------
**speed** 1 0.8069
**dist** 0.8069 1
--------------------------
Table: K
```{r, echo=FALSE, eval=FALSE}
hist(cars$speed)
```
작품
012 3,516,--------------------------
speed dist
----------- ------- ------
**speed** 1 0.8069
**dist** 0.8069 1
--------------------------
Table: K
```{r, echo=FALSE, eval=FALSE}
hist(cars$speed)
```
하지만 판더와 음모 사이의 코드 덩어리에 다른 빈 줄을 넣어 경우에도 오류가 계속
목록 :
---
title: "Teste Cor + Hist"
output: pdf_document
---
# Does not work
```{r, echo=FALSE}
library(pander)
```
Does not work:
```{r, echo=FALSE, eval=TRUE}
pander(cor(cars), caption="Korrelationen")
hist(cars$speed)
```
Does not work :
```{r, echo=FALSE, eval=FALSE}
pander(cor(cars), caption="Korrelationen")
plot(cars)
```
Does not work:
```{r, echo=FALSE, eval=FALSE}
pander(cor(cars), caption="K")
plot(cars)
```
Does not work:
```{r, echo=FALSE, result='asis', comment=NA, eval=FALSE}
pander(cor(cars), caption="Korrelationen")
#several line breaks
hist(cars$speed)
```
Doesnt Work:
--------------------------
speed dist
----------- ------- ------
**speed** 1 0.8069
**dist** 0.8069 1
--------------------------
Table: K
```{r, echo=FALSE, eval=FALSE}
hist(cars$speed)
```
# Works without Error
--------------------------
speed dist
----------- ------- ------
**speed** 1 0.8069
**dist** 0.8069 1
--------------------------
Table: K
```{r, echo=FALSE, eval=FALSE}
hist(cars$speed)
```
Works:
```{r, echo=FALSE, eval=TRUE}
cat("Korrelationen")
hist(cars$speed)
```
Works:
```{r, echo=FALSE, eval=TRUE}
pander(cor(cars), caption="Korrelationen")
cat("Korrelationen")
hist(cars$speed)
```
Works:
```{r, echo=FALSE, eval=TRUE}
cat("table: Korrelationen")
hist(cars$speed)
```
Works:
```{r, echo=FALSE, result='asis', comment=NA, eval=TRUE}
pander(cor(cars), caption="Korrelationen")
cat("table: Korrelationen")
hist(cars$speed)
```
아마이 또한 [기타 질문]에 관련된되었다 (http://stackoverflow.com/q/26863406/564164), 그래서 이것은 [수정]되어야한다 (https://github.com/ Rapporter/pander/issues/129) 이제. – daroczig
아직 남아있는 것 같습니다. 최신 버전 0.5.2에서 다른 문제가 제거되었지만 여기에도 오류가 계속 발생합니다. – Julian
네, 맞습니다. 줄리아누,'echo = FALSE'는 테이블과 이미지 사이의 여분의 줄 바꿈을 제거합니다. 나는 @Yihui가 GH에서 그를 pinging 이것에 대한 모습을 보길 바랍니다. – daroczig