Data Manipulation

Consider the msleep data from the ggplot2 package. Do the following:


Plotting

Again consider the birthwt data from the MASS package. Do the following:


Modeling and Inference

Consider the Auto data from the ISLR package. Do the following:


Modeling and Prediction

Consider the Boston data from the MASS package. (Have you seen this terribly boring and overused dataset before?) Do the following:

library(MASS)
set.seed(42)
boston_idx = sample(1:nrow(Boston), size = 250)
trn_boston = Boston[boston_idx, ]
tst_boston = Boston[-boston_idx, ]