Install R packages

Example: install the ape R package

# update all installed R packages

update.packages()

update.packages(checkBuilt=TRUE, ask=FALSE)

# download and install the R ape package

install.packages('ape')

Get location of R package library

.libPaths()

[1] "/home/username/R/x86_64-pc-linux-gnu-library/3.4"

[2] "/usr/local/lib/R/site-library"

[3] "/usr/lib/R/site-library"

[4] "/usr/lib/R/library"

Uninstall R packages

# deinstall package "ape"

remove.packages('ape')