data-raw/lego_sample/lego_sample-dataprep.R

library(readxl)
library(janitor)
library(dplyr)

# load data ---------------------------------------------------------------------
lego_sample <- read_excel(here::here("data-raw/lego_sample/lego_sample.xlsx"))

# cleaning ----------------------------------------------------------------------

# cleaning: Making Variables Snake Case

lego_sample <- lego_sample %>% 
  clean_names() %>% 
  select(-availability)

# save --------------------------------------------------------------------------

usethis::use_data(lego_sample, overwrite = TRUE)
npaterno/data_hunter documentation built on July 22, 2022, 10:20 a.m.