Learn R Programming

risk.assessr (version 3.0.1)

extract_package_version: Extract the Installed Version of a Package

Description

This function retrieves the installed version of a specified R package. If the package is not installed, returns `NA`.

Usage

extract_package_version(package_name)

Value

A character string representing the installed package version, or `NA` if the package is not found.

Arguments

package_name

A character string specifying the name of the package.

Examples

Run this code
if (FALSE) {
extract_package_version("dplyr")
# 1.1.4
}

Run the code above in your browser using DataLab