Another reproducible error with pander (+ knitr): When I try to tint a list, I cannot create a PDF file - it looks like a table or data.frame is placed inside the list. If there are only vectors in the list, the PDF compiles but looks ugly.
I am using pander 0.5.1, knitr 1.7, R version 3.1.1, Miktex + RStudio on Windows.
Doesn't work: ```{r, eval=FALSE} pander(list(cor=cor(cars) ) ) ```
Error:
output file: Preview-e905ccd5f1a.knit.md ! Undefined control sequence. l.246 \textbf{cars}: {[}1{]} ``\n 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" Preview-e905ccd5f1a.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-e905ccd5f1a.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
It compiles when I use pander in the console and manually copy and paste it:
* **cor**: -------------------------- speed dist ----------- ------- ------ **speed** 1 0.8069 **dist** 0.8069 1 --------------------------
The same thing happens when you try to put cars on the list:
```{r, eval=TRUE} pander(list(cars=cars ) ) ```
If I put Vectors on the list, it works, but the result looks ugly, as the attributes are also analyzed: {r} pander(list(a=c(1,2,3),b=c('A','b') ) )
PDF output:
• a: [1] "1, 2 and 3" attr(,"class") [1] "knit_asis" attr(,"knit_cacheable") [1] TRUE • b: [1] "A and b" attr(,"class") [1] "knit_asis" attr(,"knit_cacheable") [1] TRUE