#' ---
#' output:
#' md_document:
#' pandoc_args: [
#' '-f', 'markdown-implicit_figures',
#' '-t', 'commonmark',
#' --wrap=preserve
#' ]
#' ---
#+ reprex-setup, include = FALSE
options(tidyverse.quiet = TRUE)
knitr::opts_chunk$set(collapse = TRUE, comment = "#>", error = TRUE)
knitr::opts_knit$set(upload.fun = knitr::imgur_upload)
#+ reprex-body
Created by Paul A. Gureghian on 8/16/2018
library(Lahman)
library(tidyverse)
library(dslabs)
ds_theme_set()
Teams %>% filter(yearID %in% 1961:2001) %>%
mutate(HR_per_game = HR/G, R_per_game = R/G)
fit <- lm(R_per_game ~ BB, data = Teams)
fit
#' Created on r Sys.Date()
by the reprex package (vr utils::packageVersion("reprex")
).