In my knitr repport I have several paragraphs that are only relevant if some criteria is met.
Wrapping everything in an inline r ifelse(...
gets convuluted real fast.
So I tried with a code chunk like this
```{r conditional_block, eval=nrow(data)>0, results="asis"}
print("For theese `r nrow(data)` people, the mean salary is `r paste(round(mean(data$sallary),2))` dollars per year")
```
I tried with print
, paste
and cat
. And I tired with results asis
and markup
. But the output is always - 'raw' the inline R code shows verbatim.