data-raw/comics/comics-dataprep.R

library(readr)
library(dplyr)
library(stringr)

# load data --------------------------------------------------------------------

raw_data <- read_csv(here::here("data-raw/comics/comics.csv"))

# cleaning: none required

comics <- raw_data |>
  filter(!is.na(appearances)) |>
  mutate(publisher = ifelse(publisher == "dc", "DC", "Marvel"))



usethis::use_data(comics, overwrite = TRUE)
OpenIntroStat/openintro documentation built on June 4, 2024, 4:19 a.m.