Data Science Desktop Survival Guide
by Graham Williams
wajig install r-cran-<pkgname>.
# Load required packages from local library into the R session.
library(dplyr) # Wrangling: mutate().
library(stringi) # The string concat operator %s+%.
library(stringr) # String manipulation.
library(glue) # Format strings.
library(magrittr) # Pipelines for data processing: %>% %T>% %<>%.
library(rattle) # Weather dataset.
library(scales) # commas(), percent().
After loading the required packages into the library we access the rattle::weatherAUS dataset and save it into the template dataset named ds, as per the template based approach introduced in Williams (2017). The dataset is modestly large and is used extensively in this book to illustrate the capabilities of R for the Data Scientist.
# Initialise the dataset as per the template.
dsname <- "weatherAUS"
ds <- get(dsname)
names(ds) %<>% normVarNames()
ds %>% sample_frac()