Different R Markdown in same document for each output type
Question
In R Markdown, I would like to be able to conditionally include certain chunks depending on what I am outputting to. For example if I am knitting a PDF I would like to include a small bit of LaTeX to do a page break, but if I am knitting HTML from the same document, I would like to skip that, or perhaps include something else. So how can a document "know" where it is going, and selectively include things?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange