# NOT RUN {
# To obtain the entire dataset, run the code inside the following if statement:
if(FALSE){
library(dplyr)
library(tidyr)
library(readr)
mlb_elo <- read_csv("https://projects.fivethirtyeight.com/mlb-api/mlb_elo.csv") %>%
mutate(
playoff = as.factor(playoff),
playoff = ifelse(playoff == "<NA>", NA, playoff),
neutral = as.logical(neutral)
)
}
# }
Run the code above in your browser using DataLab