15.3 Execute content conditionally via the
As its name indicates, the
asis engine writes out the chunk content as is. The advantage of using this engine is that you can include some content conditionally—the display of the chunk content is decided by the chunk option
echo = FALSE, the chunk will be hidden. Below is a simple example:
The text in the
asis chunk will be displayed only if the condition
getRandomNumber() == 4 is (randomly) true.