r - R Markdown - 不要在 HTML 输出中显示文本
问题描述
有没有办法在 R 标记输出到 HTML 时不显示“文本”(不是代码)?例如:
```{r, echo=False}
I want the output of this R Code
```
这是介绍 .Rmd 文件中下一部分的文本。但是,我不希望它出现在我的 .HTML 文件中。
```{r, echo=False}
Next section of R code to display
```
解决方案
无论您不想在输出中显示什么,请将其放在 <!--- blabla --> 之间
例如:
```{r, echo=FALSE}
I want the output of this R Code```
<!---
This is text to introduce the next section in the .Rmd file. I, however, do NOT want this to appear in my .HTML file.
-->
```{r, echo=FALSE}
Next section of R code to display```
推荐阅读
- splunk - 如果主机不活动超过 5 分钟,则 Splunk 搜索
- tsql - Microsoft 报表生成器执行查询灰显
- ruby-on-rails - 如何从现有的 Rails 6 应用程序中删除 Minitest?
- javascript - document.getElementById() 只对一个元素进行操作
- eloquent - 如何将原始 sql 代码附加到雄辩的查询中
- java - 如何在图形实验室中调用方法
- arduino - Arduino 编译错误“为板 Arduino Nano 编译错误”
- javascript - 用 Javascript 中的正文请求中的另一组 id 替换所有 id 值
- python - 如何使用 python 从 mongodb 中删除重复文档?
- java - 如何从字符串值在 android 中创建 CSV 文件