You can render the HTML version of this example book without changing anything:
Find the Build pane in the RStudio IDE, and
Click on Build Book, then select your output format, or select “All formats” if you’d like to use multiple formats from the same book source files.
Or build the book from the R console:
To render this example to PDF as a
bookdown::pdf_book, you’ll need to install XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): https://yihui.org/tinytex/.