A note from the authors: Some of the information and instructions in this book are now out of date because of changes to Hugo and the blogdown package. If you have suggestions for improving this book, please file an issue in our GitHub repository. Thanks for your patience while we work to update the book, and please stay tuned for the revised version!
— Yihui, Amber, & Alison
Software information and conventions
The R session information when compiling this book is shown below:
## R version 4.1.0 (2021-05-18) ## Platform: x86_64-apple-darwin17.0 (64-bit) ## Running under: macOS Catalina 10.15.7 ## ## Matrix products: default ## ## locale: ##  en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 ## ## attached base packages: ##  stats graphics grDevices utils datasets ##  methods base ## ## loaded via a namespace (and not attached): ##  bookdown_0.22 blogdown_1.3.4 ##  rmarkdown_2.9 htmltools_0.5.1.1 ##  knitr_1.33
We do not add prompts (
+) to R source code in this book, and we comment out the text output with two hashes
## by default, as you can see from the R session information above. This is for your convenience when you want to copy and run the code (the text output will be ignored since it is commented out). Package names are in bold text (e.g., rmarkdown), and inline code and filenames are formatted in a typewriter font (e.g.,
knitr::knit('foo.Rmd')). Function names are followed by parentheses (e.g.,
blogdown::serve_site()). The double-colon operator
:: means accessing an object from a package.
A trailing slash often indicates a directory name, e.g.,
content/ means a directory named
content instead of a file named
content. A leading slash in a path indicates the root directory of the website, e.g.,
/static/css/style.css means the file
static/css/style.css under the root directory of your website project instead of your operating system. Please note that some directory names are configurable, such as
public/, but we will use their default values throughout the book. For example, your website will be rendered to the
public/ directory by default, and when you see
public/ in this book, you should think of it as the actual publishing directory you set if you have changed the default value.
Rmd stands for R Markdown in this book, and it is the filename extension of R Markdown files.
A “post” often does not literally mean a blog post, but refers to any source documents (Markdown or R Markdown) in the website project, including blog posts and normal pages. Typically blog posts are stored under the
content/post/ directory, and pages are under other directories (including the root
content/ directory and its subdirectories), but Hugo does not require this structure.
http://www.example.com is used only for illustration purposes. We do not mean you should actually visit this website. In most cases, you should replace
www.example.com with your actual domain name.
* in a character string often means an arbitrary string. For example,
*.example.com denotes an arbitrary subdomain of
example.com. It could be
bar also indicate arbitrary characters or objects.