Learn R Programming

patchDVI (version 1.11.3)

needsPackages: Check for and optionally install packages used by document.

Description

This function checks for needed packages

Usage

needsPackages(pkgs, install = TRUE, 
                    update = FALSE, 
                    load = FALSE, 
                    attach = FALSE)

Value

Called for the side effects.

Arguments

pkgs

A list of names of packages to check.

install

Whether to install missing packages.

update

Whether to update all packages that can be updated.

load

Whether to load namespaces for packages.

attach

Whether to run library calls.

Details

Each of the boolean arguments can be a vector of the same length as pkgs, applying separately to each entry.

Examples

Run this code
# This shouldn't do anything, as patchDVI must already be
# installed!
needsPackages("patchDVI")

Run the code above in your browser using DataLab