rstudio / rmarkdown-book

R Markdown: The Definitive Guide (published by Chapman & Hall/CRC in July 2018)
https://bookdown.org/yihui/rmarkdown
Other
781 stars 518 forks source link

add bit about using R code in YAML output options #54

Closed zkamvar closed 5 years ago

zkamvar commented 5 years ago

This demonstrates the feature in https://github.com/rstudio/rmarkdown/issues/1387

I spent over an hour trying to figure out how to do this, so I thought having it in the book is a good idea.

yihui commented 5 years ago

Thank you! I have updated the page https://bookdown.org/yihui/rmarkdown/output-formats.html

BTW, I needed a shorter example because I have to consider the PDF version (which has page width limits).