R/annotate_repostitle.R
annotate_repostitle.Rd
Annotate package titles and repository sources
annotate_repostitle(string_og)
Text string (script) with package load calls.
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.
Some annotations may be long, check for possible line breaks introduced into your script.
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-28.1\nrequire(lattice) # Trellis Graphics for R CRAN v0.21-8"