1. Getting Started
This chapter gets the local setup out of the way before the rest of the book starts using packages, notebooks, and datasets.
1.1. Choose an environment
You may work through this book in any of these ways.
Use the Docker image described in the preface if you want a prebuilt JupyterLab environment.
Install
Rlocally and work inRStudioif you prefer a desktop IDE.Install
R,IRkernel, and Jupyter if you want local notebooks without Docker.
The examples are standard R code, so the book does not depend on one editor.
1.2. Install packages
Some chapters use contributed packages rather than only base R. Install them once with install.packages.
[ ]:
install.packages(c(
'tidyverse',
'purrr',
'ggplot2',
'randomForest',
'e1071',
'pROC',
'mice',
'Amelia',
'missForest',
'Hmisc',
'mi'
))
1.3. Load packages
Load packages at the top of a notebook or script before using their functions.
[ ]:
library(tidyverse)
library(ggplot2)
library(randomForest)
library(e1071)
1.4. Get help
Use the built-in help system frequently while reading the book.
[ ]:
?mean
help('lm')
example('plot')
1.5. Keep moving
Once your environment is working and packages install cleanly, continue into the core language chapters. You can come back to this page whenever you need a reminder on package installation or help lookup.