12.1 Get started

You can install either the CRAN version or the development version on GitHub (https://github.com/rstudio/bookdown):

# install from CRAN
install.packages("bookdown")

# or GitHub
devtools::install_github("rstudio/bookdown")

If you use RStudio, you can start a new bookdown project from the menu File -> New Project -> New Directory -> Book Project using bookdown.11 Open the R Markdown file index.Rmd, and click the button Build Book on the Build tab of RStudio. This will compile the book and display the HTML version within the RStudio Viewer, which looks like Figure 12.1.

The HTML output of the bookdown template.

FIGURE 12.1: The HTML output of the bookdown template.

You may add or change the R Markdown files, and hit the Knit button again to preview the book. If you prefer not to use RStudio, you may also compile the book through the command line using bookdown::render_book().


  1. Alternatively, the command bookdown:::bookdown_skeleton(getwd()) will create a skeleton project in your current working directory.