I am a beginner in using Markdown (I am using it with R studio and knitr).
I am struggling with a point that I hope you would be able to help me to figure it out.
I would like a chunk to be evaluated only if the output_format of the rmarkdown document is pdf. In other words, the chunk option "eval" automatically set to TRUE if the knitr output was selected as "knitr PDF". Otherwise, eval = FALSE.
In your view, what is the most straightforward way to do this.
Many thanks in advance