Useful R Packages & Resources

packages
resources
R
Published

September 4, 2023

Modified

September 20, 2023

A list of cool R packages & resources, updated when I think about it

Stats

Packages useful for statistical analyses

  • DHARMa - Model diagnostics
  • glmmTMB - Generalized linear mixed models and extensions

Visualizations

Packages useful for visualizing data

Acquiring Data

For accessing data

  • weathercan - Download historical ECCC (Canadian) data (my package!)

Working with Data

For working with data or specific data types

Packages

  • tidyverse - General collection of packages for managing, summarizing, transforming data
  • lubridate - Dealing with dates and datetimes
  • stringr - Pattern match strings (text)
    • Amazing article on how to use regex
  • assertr - Test that your data is as it should be

Resources

  • R for Data Science [book] by Hadley Wickham, Mine Çetinkaya-Rundel, and Garrett Grolemund
  • R4DS Online Learning Community - Community for learning R, generally with the tidyverse, originally developed as an “R for Data Science” (R4DS) book club

Spatial Data

Packages

Resources

Workflows

Packages useful for workflows

  • pak - For installing packages from any locations
    • I find pak more informative, quicker, and just simpler than install.packages()
    • e.g., pak::pkg_install("packageName")
  • quarto - A package but also a standalone program for creating reports from your R scripts
  • gt - Creates pretty tables for reports

Package Development1

Packages

  • usethis - Automates a lot of setup to make things quicker
    • e.g., usethis::use_testthat() to quickly set up testthat infrastructure
  • pkgdown - Create package documentation website from your docs and vignettes
  • testthat - Tests for your package

Resources

  • R packages [book] by Hadley Wickham and Jennifer Bryan

Footnotes

  1. Making packages↩︎