Learn R Programming

Require (version 1.0.1)

extractPkgName: Extract info from package character strings

Description

Cleans a character vector of non-package name related information (e.g., version)

Usage

extractPkgName(pkgs, filenames)

extractVersionNumber(pkgs, filenames)

extractInequality(pkgs)

extractPkgGitHub(pkgs)

Value

Just the package names without extraneous info.

Arguments

pkgs

A character string vector of packages with or without GitHub path or versions

filenames

Can be supplied instead of pkgs if it is a filename e.g., a .tar.gz or .zip that was downloaded from CRAN.

See Also

trimVersionNumber()

Examples

Run this code
extractPkgName("Require (>=0.0.1)")
extractVersionNumber(c(
  "Require (<=0.0.1)",
  "PredictiveEcology/Require@development (<=0.0.4)"
))
extractInequality("Require (<=0.0.1)")
extractPkgGitHub("PredictiveEcology/Require")

Run the code above in your browser using DataLab