Preface

This book template is what I learned from Advanced Data Management. Sean Kross has a much better template on GitHub.

A few things you may want to do before building the book:

  1. Create a designated folder for all files needed for the book --
    • All .Rmd files
    • .yml file(s)
    • R script file if needed
  2. Create an r-project.
  3. Install the package "bookdown" -- needed to build the book
  4. Read the help file of the function bookdown::render_book

Once you have everything in one place, do the following:

## for PDF:
bookdown::render_book("index.Rmd", "bookdown::pdf_book")

## for HTML:
bookdown::render_book("index.Rmd", "bookdown::gitbook")

We have now completed a book using a basic template. For more options, consult the book by Yihui Xie.