Conventions of the book and some notes

Here are some notes of the conventions of this book and notes for R beginners and those who are not used to reading rmarkdown-generated html documents.

Texts in gray boxes

They are one of the following:

  • objects defined on R during demonstrations
  • R functions
  • R packages

When it is a function, I always put parentheses at the end like this: st_read(). Sometimes, I combine a package and function in one like this: sf::st_read(). This means it is a function called st_read() from the sf package.

Colored Boxes

Codes are in blue boxes, and outcomes are in red boxes.

Codes:

runif(5)

Outcomes:

## [1] 0.5957952 0.8559786 0.2705708 0.8962588 0.3031269

Parentheses around codes

Sometimes you will see codes enclosed by parenthesis like this:

(
  a <- runif(5)
)
## [1] 0.82105107 0.03786402 0.71051297 0.08743471 0.65828185

The parentheses prints what’s inside of a newly created object (here a) without explicitly evaluating the object. So, basically I am signaling that we will be looking inside of the object that was just created.

This one prints nothing.

a <- runif(5)

Footnotes

Footnotes appear at the bottom of the page. You can easily get to a footnote by clicking on the footnote number. You can also go back to the main narrative where the footnote number is by clicking on the curved arrow at the end of the footnote. So, don’t worry about having to scroll all the way up to where you were after reading footnotes.