versions (version 0.3)

installed.versions: installed.versions

Description

List the installed versions of packages in a library directory

Usage

installed.versions(pkgs, lib)

Arguments

pkgs
character vector of the names of packages for which to query the installed versions
lib
character vector of length one giving the library directory containing the packages to query. If missing, defaults to the first element of .libPaths().

Value

a named character vector of version numbers corresponding to pkgs, with names giving the package names. If a packakge could not be found in lib, an NA will be returned.

Examples

Run this code

# the versions of versions
installed.versions('versions')

# apply to multiple packages
installed.versions(c('stats', 'versions'))

# add a package that doesn't exist or isn't installed
# (returns NA for that one)
installed.versions(c('stats', 'versions', 'notapackage'))

Run the code above in your browser using DataLab