Use any package. If package is not installed, this will install from CRAN.

usePkg(packageName, allowInstall = FALSE)

Arguments

packageName

Name of package as *string*.

allowInstall

let the package be installed from CRAN

Value

TRUE if package successfully loaded, FALSE otherwise.

Author

Benjamin M. Kandel, BB Avants

Examples


usePkg("randomForest")
#> [1] TRUE
usePkg("stats", allowInstall = TRUE)
#> [1] TRUE