I am working on an Rmd down report and depending on an R variable I want to decide whether to include a paragraph or not
e.g.
##Abstract
paragraph Blurb
If result type is 1 then
another paragraph of blurb
I can't find any easy way to do this. I've tried using a code chunk.
e.g
```{r echo=FALSE}
if ( resultType1 ) {
cat(c("lines of blurb","more lines of blurb"))
}
```
Unfortunately, this outputs the optional paragraph in a box plus in a totally different font from the general abstract paragraph and has a feel of surely there is a better way to do this