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

extractPkgName(pkgs)

extractVersionNumber(pkgs)

extractInequality(pkgs)

extractPkgGitHub(pkgs)

Arguments

pkgs

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

Value

Just the package names without extraneous info.

See also

Examples

extractPkgName("Require (>=0.0.1)")
#> [1] "Require"
extractVersionNumber(c("Require (<=0.0.1)", "PredictiveEcology/Require@development (<=0.0.4)"))
#> [1] "0.0.1" "0.0.4"
extractInequality("Require (<=0.0.1)")
#> [1] "<="
extractPkgGitHub("PredictiveEcology/Require")
#> [1] "Require"