install.packages()
get_help()
docs
The install.packages()
function comes with R
and is part of the Base R
{base}
package.
We use this function to install packages, aka libraries, onto your computer. Libraries only need to be installed one time. To load an installed library, use the function library()
.
If you need to install a package from a non-default database (i.e. not CRAN), this function may or may not work.
install.packages("name of package to install in quotes")
install.packages(c("array", "of", "package", "names", "to", "install"))
# Install the viridis package
install.packages("viridis")