2.1 How to Use This Guide
This guide is intended for the reader to follow along step by step in chronological order. As you read, make sure to practice your R skills by completing the exercises and examples in the book. While some code is already written out in the text, typing out the code manually (rather than copy and pasting from the book) will help speed up the learning process – practice makes progress!
All of the exercises and examples should be accessible for everyone unless package content has changed. If this is the case, I will do my best to create new and updated examples.
Most of my stylistic formatting conventions should be fairly accessible, but I find that it’s best to be as explicitly detailed as possible:
Important details will occasionally be bolded, italicized, or both
Keyboard shortcut commands are in bold (e.g., Ctrl + S)
Package names are in bold (e.g., tidyverse)
Any in-line code (i.e., code text that is interspersed within regular text) is enclosed in backticks (
`mean()`
) or is distinguished by different font (e.g.,mean()
)Examples of code will be arranged as a code chunk. This is distinguished by a slightly greyed out background behind the code text. Code will be color coordinated by code type (e.g., function, symbol, comment, character string, etc.).
object <- 1 + 2 + 3 # this is some code
mean(object) # this is more code
object %>% mean() # another line of code
- The output of executed code will occasionally be displayed in the book. An output is the consequence that occurs after code is executed/run. Outputs will only contain text that begins with
##
. In the example below the top chunk is the code that is executed and the bottom chunk is the output.
object <- 1 + 2 + 3 # this is some code
mean(object) # this is more code
## [1] 6
object %>% mean() # another line of code
## [1] 6
Throughout the book, there are active links that may refer to another section of the book or a figure/table. Clicking on these links will automatically shift your screen to the linked page. For example, click 1 to go back to the preface.
Examples and exercises throughout the book are intended for the reader to follow along. This means that the code is manually typed and executed into RStudio by the user. Occasionally, examples/exercises will build off of previous examples and will not always be explicitly stated. It is safe to assume that exercises will only build from previous tasks from the same section.