R Markdown Cookbook is now available! Check it out for short, snappy, real-world examples of how to customize and polish every aspect of your R Markdown.
To celebrate, a thread of 10 of my favorite tips (1/n) https://twitter.com/CRC_MathStats/status/1318871113884180483
To celebrate, a thread of 10 of my favorite tips (1/n) https://twitter.com/CRC_MathStats/status/1318871113884180483
Overrun by the amount of code in a single Rmd or want it better modularized for collaboration? Child documents can help you write multiple Rmd and render them to one output:
https://bookdown.org/yihui/rmarkdown-cookbook/child-document.html
(2/n)
https://bookdown.org/yihui/rmarkdown-cookbook/child-document.html
(2/n)
Have some Markdown code to show only if certain logical conditions are met? Using the {asis} language engine and the {echo} chunk option makes this straightforward and elegant
https://bookdown.org/yihui/rmarkdown-cookbook/eng-asis.html
(3/n)
https://bookdown.org/yihui/rmarkdown-cookbook/eng-asis.html
(3/n)
Want to automatically generate code chunks and/or MD text (e.g. separate header and plot for a set of variables)? knit_expand() is your friend
https://bookdown.org/yihui/rmarkdown-cookbook/knit-expand.html
(4/n)
https://bookdown.org/yihui/rmarkdown-cookbook/knit-expand.html
(4/n)
Need to reference specific lines of code in your writing? Output hooks let you post-process your output -- including adding line numbers!
https://bookdown.org/yihui/rmarkdown-cookbook/hook-number.html
(5/n)
https://bookdown.org/yihui/rmarkdown-cookbook/hook-number.html
(5/n)
Curious about **all the chunk options** besides `eval` and `echo`? The print appendix includes a comprehensive list, which you can also find on @xieyihui 's blog
https://yihui.org/knitr/options/
(6/n)
https://yihui.org/knitr/options/
(6/n)
Want to customize the style of an arbitrary block of text or code? Insert your own "fence" with Pandoc divs!
https://bookdown.org/yihui/rmarkdown-cookbook/custom-blocks.html
(7/n)
https://bookdown.org/yihui/rmarkdown-cookbook/custom-blocks.html
(7/n)
Are you writing a tutorial or vignette and want to show and mock a temp file on the fly? The {cat} engine can help you out
https://bookdown.org/yihui/rmarkdown-cookbook/eng-cat.html
(8/n)
https://bookdown.org/yihui/rmarkdown-cookbook/eng-cat.html
(8/n)
Concerned about accessibility? You should be! Use web best practices to make your HTML output more accessible and screen-reader friendly
https://bookdown.org/yihui/rmarkdown-cookbook/html-accessibility.html
(9/n)
https://bookdown.org/yihui/rmarkdown-cookbook/html-accessibility.html
(9/n)
Will some of your readers care about the code but most won't? Automatically pull it all into an appendix
https://bookdown.org/yihui/rmarkdown-cookbook/code-appendix.html
(10/n)
https://bookdown.org/yihui/rmarkdown-cookbook/code-appendix.html
(10/n)
Check out the book for so much more. Beyond the recipes, you'll also learn how all of the different pieces of Rmd processing fit together so you can create brand new recipes! Plus, you get to look at the amazing cover art thanks to @allison_horst !
Oops! Missed one of them and only did 9 
Need multiple output formats? Make sure your custom styling (from the previous 2 chapters!) will work either way
(11-ish / n) https://bookdown.org/yihui/rmarkdown-cookbook/latex-html.html

Need multiple output formats? Make sure your custom styling (from the previous 2 chapters!) will work either way
(11-ish / n) https://bookdown.org/yihui/rmarkdown-cookbook/latex-html.html