Learning Objectives
- Define a package
- Install a package
- Load a package
What is a package?
Set of R functions to make your life easier
Examples
Install a package
## - Always plural
## - Package name in quotes
## - Capitalization matters
install.packages("tidyverse")
Load a package
## - Always singular
## - Quotes not needed
## - Capitalization matters
library(tidyverse)
Where to Find Packages
- Over 10,000 packages on
CRAN
- BioConductor
- GitHub
How To Choose
Caveat emptor. Be judicious.
Look for:
- How well maintained?
- Can you judge the code yourself?
- Has anyone heard of the author?
- Peer reviewed articles? (sometimes)
Example: MatchIt on
(CRAN) or its
Website
And Now You Know!
Next up: Tidyverse