Learn R Programming

evanverse (version 0.3.7)

pkg_version: pkg_version: Check Installed and Latest Versions of R Packages

Description

This function checks the installed and latest available versions of R packages across CRAN, Bioconductor, and GitHub. It supports case-insensitive matching and smart console previews.

Usage

pkg_version(pkg, preview = TRUE)

Value

A data.frame with columns: package, version (installed), latest (available), and source.

Arguments

pkg

Character vector of package names.

preview

Logical. If TRUE, print the result to console.

Examples

Run this code
if (FALSE) {
# Check versions of multiple packages (requires network):
pkg_version(c("ggplot2", "dplyr"))

# Check with preview disabled:
result <- pkg_version(c("ggplot2", "limma"), preview = FALSE)
}

# \donttest{
# Quick demo with base R package:
try(pkg_version("base", preview = FALSE))
# }

Run the code above in your browser using DataLab