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

GetPackage(package)

Arguments

package

A character vector of packages to load

Examples

# NOT RUN {
GetPackage('gam')

# }