Annotate Package Titles and Repository Sources

annotate_repostitle(string_og)

Arguments

string_og

Text string (script) with package load calls.

Value

Text string with package titles and package repository source annotations. Will make note of packages not currently installed. Lines with existing comments or annotations are ignored by the regular expression that matches package names. Also ignores base packages.

Details

Some annotations may be long, check for possible line breaks introduced into your script.

Examples

test_string <- c("library(boot)\nrequire(lattice)")
annotate_repostitle(test_string)
#> [1] "boot # Bootstrap Functions (Originally by Angelo Canty for S), CRAN v1.3-28\nlattice # Trellis Graphics for R, CRAN v0.20-45"