Annotate Function Calls

annotate_fun_calls(string_og)

Arguments

string_og

text string (script) with package load calls

Value

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

Examples

test_string <- c("library(boot)\nrequire(lattice)\ncanonical.theme()")
cat(annotate_fun_calls(test_string))
#> library(boot) # No used functions found
#> require(lattice) # canonical.theme
#> canonical.theme()