This function quickly loads one or more packages, installing them quietly if necessary.

qload(..., load = TRUE, silent = TRUE)

Arguments

...

the packages to load/install. Packages are loaded with library and installed first with install.packages if necessary.

load

load the packages. Set to FALSE to just install any missing packages. Defaults to TRUE.

silent

keep output as silent as possible. Defaults to TRUE.

Value

The result is a list of packages cited in the scripts.

Details

The function probably requires R 3.0.0 or above to make use of the quiet argument when calling install.packages. It is not clear what the argument previously achieved in older versions of R.

Author

François Briatte <f.briatte@gmail.com>

Examples

qload("questionr")
qload("questionr", silent = FALSE)
#> Loaded package: questionr