带有knitr的Hmisc乳胶在PDF输出中产生假乳胶评论

时间:2015-08-22 19:33:26

标签: pdf latex knitr

我使用Hmisc latex命令在Rstudio的Rmd文档中打印summary()生成的摘要表。它可以很好地与结果=' asis'指定了选项,但我的PDF文件中出现了虚假行:

%latex.default(summary(cars),file =“”)%

我认为knitr必须以某种方式逃避此评论,以便将其逐字转移到输出中。有谁知道我怎么能抑制这种行为?

这是我的.Rmd文件的内容:

---
title: "Untitled"
author: "John Smith"
date: "August 22, 2015"
output: pdf_document
---

```{r, results='asis', echo=FALSE, message=FALSE}
library(Hmisc)
latex(summary(cars), file="")

```

当我渲染它时,我得到的PDF包含短语"%latex.default(summary(cars),file =`')%"

我在Mac OS X Darwin 12.6.0和Knitr 1.11上使用R版本3.2.1(2015-06-18)

想法?

彼得

0 个答案:

没有答案
相关问题