R package data

Mini-Lecture 15

Ben Baumer

Smith College

2024-10-29

R Package data

data vs. data-raw vs. data.R

  • data/ is where the .rda files go
    • should be data.frames or tibbles
    • lazy-loaded with package

data vs. data-raw vs. data.R

  • data-raw/ is where you keep the raw data and scripts
    • not part of the package
    • are part of the repository!
    • tidyverse convention
    • create with usethis::use_data_raw()

data vs. data-raw vs. data.R

  • R/data.R is where you document the stuff in data
    • just the name of the data set
    • use roxygen2 to add other information
    • tidyverse convention

Now

Homework