Learn R Programming

RDocumentation (version 0.8.2)

check_package: Check if a package is installed for the user.

Description

Check if a package is installed for the user.

Usage

check_package(pkg, version)

Arguments

pkg

Name of the package

version

the latest version to be checked

Value

1 if the package is not installed; -1 if the package is not up to date; 0 if the package if the package is installed and up to date.

Examples

Run this code
# NOT RUN {
check_package("RDocumentation","0.2")
check_package("utils","3.3.1")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab