Skip to content

Instantly share code, notes, and snippets.

@ryanburge
Created November 15, 2023 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanburge/807d0ede5a06177bb9b2973ce110aa29 to your computer and use it in GitHub Desktop.
Save ryanburge/807d0ede5a06177bb9b2973ce110aa29 to your computer and use it in GitHub Desktop.
Grad Methods - 11/15/2023
error_bar <- function(wd){
if(missing(wd)){
geom_errorbar(aes(ymin=lower, ymax=upper), width=.2, position=position_dodge(.9))
} else{
geom_errorbar(aes(ymin=lower, ymax=upper), width=wd, position=position_dodge(.9))
}
}
cces20 <- read_csv("https://www.dropbox.com/s/wuixmc67ae786wp/small_ces2020.csv?dl=1")
Codebook is here: https://www.dropbox.com/s/s01kefaks4u6g1f/small_ces2020%20Codebook.docx?dl=0
bball <- read_csv("https://raw.githubusercontent.com/ryanburge/pls2003_sp17/master/bball.csv", guess_max = 25000) %>%
rename(games = g, wins =w, losses = l, runs =r, atbats = ab, hits =h, homeruns =hr, walks = bb, strikeout = so, stolenbase = sb, earnedruns = era)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment