About this

This is a book on rmarkdown, aimed for scientists. It was initially developed as a 3 hour workshop, but is now developed into a resource that will grow and change over time as a living book.

This book aims to teach the following:

  • Getting started with your own R Markdown document
  • Improve workflow:
    • With rstudio projects
    • Using keyboard shortcuts
  • Export your R Markdown document to PDF, HTML, and Microsoft Word
  • Better manage figures and tables
    • Reference figures and tables in text so that they dynamically update
    • Create captions for figures and tables
    • Change the size and type of figures
    • Save the figures to disk when creating an rmarkdown document
  • Work with equations
    • inline and display
    • caption equations
    • reference equations
  • Manage bibliographies
    • Cite articles in text
    • generate bibliographies
    • Change bibliography styles
  • Debug and handle common errors with rmarkdown
  • Next steps in working with rmarkdown - how to extend yourself to other rmarkdown formats

0.1 Why write this as a book?

There are many great books on rmarkdown and it’s various features, such as “Rmarkdown: The definitive guide”, “bookdown: Authoring Books and Technical Documents with R Markdown”, and “Dynamic Documents with R and knitr, Second edition”, and Yihui Xie’s thesis, “Dynamic Graphics and Reporting for Statistics”.

So why write a book?

Good question. The answer is that writing this as a book provides a way for me to structure the content in the form of a workshop, in a way suitable for learning in a few hours.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

0.2 How to use this book

This book was written to provide course materials for a 3 hour course on rmarkdown.

We worked through the following sections in the book in 3 hours:

With the remaining sections being used as extra material, or have since been written after the course:

Course materials can be downloaded by using the following command from the usethis package:

usethis::use_course("bit.ly/rmd4sci-monash")