Creating an R Package

Math 241, Spring 2026

Step 1: Create a version control R package.

Step 2: Create a version control RStudio Project with the same name as the GitHub repo.

Step 3: If you want to include data in the package, add the raw data and wrangle it into the version the package will share.

usethis::use_data(insert_data_name, overwrite = TRUE)

Step 4: Add your functions to the R folder.

Step 5: Create documentation.

Step 6: Test drive your package functions.

Step 7: Run a more formal check of your package with devtools::check().

Step 8: Try installing the package with devtools::install().

Step Often: Commit and push the changes to the GitHub repository.

Steps to Come: