Learn R Programming

emil (version 2.2.3)

nice_require: Load a package and offer to install if missing

Description

If running R in interactive mode, the user is prompted for installing missing packages. If running in batch mode an error is thrown.

Usage

nice_require(pkg, reason)

Arguments

Value

Nothing

Examples

Run this code
nice_require("base", "is required to do anything at all")

Run the code above in your browser using DataLab