In addition to functions already included in R, below contains the code you will need to load to be prepared to answer questions for Jeopardy
library(dplyr)
## Bootstrap Function
bootstrap <- function(x, statistic, n = 1000L) {
bs <- replicate(n, {
sb <- sample(x, replace = TRUE)
statistic(sb)
})
data.frame(Sample = seq_len(n),
Statistic = bs)
}
se <- function(x) sd(x) / sqrt(length(x))
## College data
college <- read.csv("https://collinn.github.io/data/college2019.csv")
## Hawks data
hawks <- read.csv("https://collinn.github.io/data/hawks.csv")
## Fix penguin data
penguins <- read.csv("https://collinn.github.io/data/penguins.csv")
penguins <- filter(penguins, !is.na(bill_length_mm))