I am working on a Rmd report and depending on the variable R I want to decide whether to include a paragraph or not.
eg.
paragraph Blurb
If result type is 1 then
another paragraph of blurb
I cannot find an easy way to do this. I tried using a piece of code.
eg
```{r echo=FALSE}
if ( resultType1 ) {
cat(c("lines of blurb","more lines of blurb"))
}
```
Unfortunately, this displays an optional paragraph in the plus box in a completely different font from the general paragraph paragraph and has the feeling that there is a better way to do this
source
share