load.package: Download Package and Load into Memory

Description Usage Arguments Details Value Author(s) Examples

Description

Loads requested package into memory via the library function, first using install.packages to download requested pacakge if not already downloaded.

Usage

1
load.package(x, mirror=getOption("repos")[[1]])

Arguments

x

The name of the package to be loaded, as a character string.

mirror

The name of the CRAN mirror site from which any package that needs installing is to be sourced. The default is to use the currenly assigned mirror sits using the command getOption("repos")[[1]]. See Details.

Details

If the mirror is undefined or unresponsive, an alternative mirror can be specified. E.g. mirror = "http://www.stats.bris.ac.uk/R/". For a full set of available mirror sites, see https://cran.r-project.org/mirrors.html.

Value

None

Author(s)

Paul Williamson

Examples

1
2
## Not run:
## Not run: load.package("ENVS450")

DrPaulWilliamson/ENVS450 documentation built on May 9, 2019, 3:23 a.m.