R pander 包:无法 运行 Rmd 文档中的 CrossTable 示例
R pander package: Unable to run CrossTable example in Rmd document
我无法使用 "Using pander with knitr" 小插图中的 CrossTable 示例将 Rmd 编译为 pdf。
这是我的代码
---
title: "Pander CrossTable test"
author: "Christiaan Pauw"
date: "08 March 2016"
output: pdf_document
---
```{r }
library(pander)
library(descr, quietly = TRUE)
pander(CrossTable(mtcars$gear, mtcars$cyl))
```
错误信息如下:
输出文件:Untitled.knit.md
! LaTeX Error: There's no line here to end.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.159 ~\15\\
pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
Execution halted
这是我的会话信息
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] descr_1.1.2 pander_0.6.0 ggplot2_2.0.0 reshape2_1.4.1 stargazer_5.2 raster_2.5-2
[7] Matrix_1.2-3 sp_1.2-1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.3 knitr_1.12.3 magrittr_1.5 munsell_0.4.2 colorspace_1.2-6
[6] xtable_1.8-0 lattice_0.20-33 stringr_1.0.0 plyr_1.8.3 tools_3.2.3
[11] grid_3.2.3 gtable_0.1.2 htmltools_0.3 yaml_2.1.13 digest_0.6.9
[16] rmarkdown_0.9.5.1 stringi_1.0-1 scales_0.3.0
郑重声明:问题似乎自行解决了。当我在几次更新后回到这个问题时,一切正常
它适用于 R 版本 3.3.0 和 Rstudio 版本 0.99.902。 pandoc 版本是 1.15.2
我无法使用 "Using pander with knitr" 小插图中的 CrossTable 示例将 Rmd 编译为 pdf。
这是我的代码
---
title: "Pander CrossTable test"
author: "Christiaan Pauw"
date: "08 March 2016"
output: pdf_document
---
```{r }
library(pander)
library(descr, quietly = TRUE)
pander(CrossTable(mtcars$gear, mtcars$cyl))
```
错误信息如下: 输出文件:Untitled.knit.md
! LaTeX Error: There's no line here to end.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.159 ~\15\\
pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
Execution halted
这是我的会话信息
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] descr_1.1.2 pander_0.6.0 ggplot2_2.0.0 reshape2_1.4.1 stargazer_5.2 raster_2.5-2
[7] Matrix_1.2-3 sp_1.2-1
loaded via a namespace (and not attached):
[1] Rcpp_0.12.3 knitr_1.12.3 magrittr_1.5 munsell_0.4.2 colorspace_1.2-6
[6] xtable_1.8-0 lattice_0.20-33 stringr_1.0.0 plyr_1.8.3 tools_3.2.3
[11] grid_3.2.3 gtable_0.1.2 htmltools_0.3 yaml_2.1.13 digest_0.6.9
[16] rmarkdown_0.9.5.1 stringi_1.0-1 scales_0.3.0
郑重声明:问题似乎自行解决了。当我在几次更新后回到这个问题时,一切正常
它适用于 R 版本 3.3.0 和 Rstudio 版本 0.99.902。 pandoc 版本是 1.15.2