Installing R Packages


Example

# To install, try...
install.packages("tidyverse")

# If download and compilation succeeded, try loading the package.
library(tidyverse)


Install from Source Code

install.packages("path/to/tidyverse_2.0.0.tar.gz", repos=NULL)


Install from GitHub

Multiple packages exist for installing packages directly from !GitHub.

Once the devtools package has been downloaded, try using the install_github function.

devtools::install_github("tidyverse/ggplot2")

Alternatively, once the pak package has been downloaded, try using the pak function.

pak::pak("tidyverse/ggplot2")


Updating Packages

update.packages()