Learn R Programming

zoon (version 0.6.5)

GetPackage: Helper to install (if needed) and load a package

Description

Given a package name, either as a string or object, load the package if it exists, else install it from CRAN and then load

Usage

GetPackage(package)

Arguments

package

A character vector of packages to load

Examples

Run this code
# NOT RUN {
GetPackage('gam')

# }

Run the code above in your browser using DataLab