library(tidyverse)
library(palmerpenguins)
theme_set(theme_bw())
theme_update(axis.title = element_text(size = 24))
tuesdata <- tidytuesdayR::tt_load(2020, week = 28)
#>
#> Downloading file 1 of 1: `coffee_ratings.csv`
coffee_ratings <- tuesdata$coffee_ratings
coffee_aroma <- coffee_ratings |> filter(aroma > 5.5)
shuffle <- function(x){
n <- length(x)
return(sample(x, n))
}
resample <- function(df){
if (!is.data.frame(df)){
stop("The df object must be a data frame.")
}
dplyr::slice_sample(df, n = nrow(df), replace = T )
}
penguins <- penguins |> drop_na()