Annotate Repository Sources

annotate_repo_source(string_og)

Arguments

string_og

text string (script) with package load calls

Value

text string with 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.

Examples

test_string <- c("library(boot)\nrequire(lattice)")
annotate_repo_source(test_string)
#> [1] "library(boot)    # CRAN v1.3-28\nrequire(lattice) # CRAN v0.20-45"