Skip to contents

Annotate package titles and repository sources

Usage

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] "library(boot) # Bootstrap Functions (Originally by Angelo Canty for S) CRAN v1.3-30\nrequire(lattice) # Trellis Graphics for R CRAN v0.22-5"