【发布时间】:2015-07-15 11:37:57
【问题描述】:
我正在编写 Rmd 向下报告,我想根据 R 变量决定是否包含段落
例如
##Abstract
paragraph Blurb
If result type is 1 then
another paragraph of blurb
我找不到任何简单的方法来做到这一点。我尝试过使用代码块。
例如
```{r echo=FALSE}
if ( resultType1 ) {
cat(c("lines of blurb","more lines of blurb"))
}
```
不幸的是,这会在一个框中输出可选段落,加上与一般摘要段落完全不同的字体,并且感觉肯定有更好的方法来做到这一点
【问题讨论】: