R Markdown Cookbook
This book is in a very early stage of development. If you have any suggestions on what should be included within this book, please get in touch via GitHub.
R Markdown is a powerful tool for combining analysis and reporting into the same document. Since the development of the rmarkdown package (Allaire et al. 2020), it has grown to become a diverse ecosystem of code, and reports, books and websites can all easily be generated directly from R code.
There is a wealth of guidance which has grown over the past few years, and the book R Markdown: The Definitive Guide (Xie, Allaire, and Grolemund 2018) provides an overview of all that can be done with R Markdown. However, as noted by Yihui, it was commented by the publisher that it would be beneficial to provide more practical examples of the use of R Markdown. And so, the idea of this book was born.
To fill the gap for official documentation, users often seek for help on StackOverflow. At the time of writing, there were almost 4,000 different questions with the
r-markdown tag. However, the use of the website is relatively difficult if you do not have a specific problem you are trying to search for, and therefore it is hard to be able to tell what is possible with R Markdown unless you have the insight to search for a specific question. This book aims to draw together much existing literature from StackOverflow and other details hidden across the internet to provide up-to-date solutions for everyday queries that users commonly face.
This book is designed to provide a range of examples of how to extend the functionality of your R Markdown documents. As a cookbook, this guide is recommended to new or intermediate R Markdown users who are looking for practical examples of how R Markdown documents can be effectively updated.
Allaire, JJ, Yihui Xie, Jonathan McPherson, Javier Luraschi, Kevin Ushey, Aron Atkins, Hadley Wickham, Joe Cheng, Winston Chang, and Richard Iannone. 2020. Rmarkdown: Dynamic Documents for R. https://CRAN.R-project.org/package=rmarkdown.
Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown.