r - 如何获取有关 Rmarkdown block 选项的帮助?

标签 r knitr r-markdown

我开始使用 Rmarkdown 并且非常喜欢它。但我有一个新手问题,无论是否荒谬,我都找不到直接的答案:

我不知道在knitr文档或其他地方我可以了解到在插入的 block 中写入哪些有用的东西来告诉R要绘制或不绘制什么。例如:

```{r warnings=FALSE, message=FALSE}

将阻止 R 消息和警告出现在 HTML 输出中。我在另一个问题中看到了这一点,我想知道如何使用 ? 或类似的方法自己计算类似的事情。

谢谢。

最佳答案

你看过@文档吗yihui provides on the knitr site

我还强烈建议您看看他最近发行的书 dynamic documents with R and Knitr他涵盖了您合理使用的所有内容,甚至还包括一些内容。

您还可以通过创建 R block 轻松探索 R studio 中的选项

}```

adding a comma
```{r,
}```

and pressing tab after the comma and it will give you all the potential options - they are well named and you can easily focus your search more thoroughly. For example, if you noticed the `purl` option you could explore more and find it is for extracting R code from the chunk.

关于r - 如何获取有关 Rmarkdown block 选项的帮助?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18760065/

相关文章:

R:基于字符串访问对象字段

R:仅当键值相同并且键在连续行中重复时,如何对行中的值求和?

r - 在 latex 表中显示\复选标记

r - ncol(xj) : object 'xj' not found when using R matplot() 中的错误

r - 使用 rmarkdown/knitr 将所有代码保存到最后

r - 使用 knitr 和 knitExtra 编织时找不到 kable_input

r - 在 R Markdown 中,无论输出类型如何(pdf、html、docx),都在每个页面上创建页眉/页脚

r - 如何编写可写入 rmarkdown 文件的 R 函数?

r - 如何从 R-package 'mice' 中提取汇总的估算数据?