在Rmarkdown中打印外部脚本而不运行它

时间:2016-02-10 16:50:46

标签: r knitr r-markdown

在我的Rmarkdown文档中,我想从外部脚本打印代码但不运行代码。类似于source(“script.R”)但没有实际运行代码。下面是一个假设的例子,script.R有我想要显示但不能运行的代码。


---
title: "Untitled"
output: html_document
---


You can see the R code below:

```{r}
# I want to print the code from this script but not run it
xxx("script.R")
```

0 个答案:

没有答案
相关问题