Learn R Programming

sos (version 2.0-0)

installPackages: install packages with minimum count

Description

Ensure that the most important packages in x are installed. "Importance" here is defined in the description of the minCount argument below.

Usage

installPackages(x, minCount, ...) # S3 method for findFn installPackages(x, minCount, ...) # S3 method for packageSum installPackages(x, minCount, repos = getOption("repos"), ...)

Arguments

x

either a character vector to be passed to install.packages or a findFn or a packageSum object

minCount

Controls how many of the packages identified in x to pass to install.packages.

If x is a findFn or packageSum object, install every x[, 'Package'] with x[, 'Count'] >= minCount. By default, minCount = sqrt(x[1, 'Count']).

repos

argument passed to install.packages

optional arguments passed to install.packages

Value

none

Details

Functions PackageSum2 and packageSum obtain some of the information displayed from installed packages. To get more information in those summaries, run installPackages on a findFn or packageSum object to install more of the packages found.

See Also

install.packages PackageSum2

Examples

Run this code
# NOT RUN {
##
## 1.  findFn object
##
spl <- findFn("spline", maxPages = 2)
# check the code but do not install anything:
installPackages(spl, minCount=spl[1, 'Count']+1)

# default: install packages with 
# Count>=minCount
# }
# NOT RUN {
installPackages(spl)
# }
# NOT RUN {
##
## 2.  packageSum object
##

splS <- packageSum(spl)
# check the code but do not install anything:
installPackages(splS, splS[1, 'Count']+1)

# install ALL packages
# }
# NOT RUN {
installPackages(splS, 1)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab