Annotate package datasets
Value
text string with annotations for datasets loaded from packages explicitly, lazily, or through name-spacing. Will make note of packages not currently installed. Lines with existing comments or annotations are ignored.
Examples
test_string <- c("library(tidyr)\nlibrary(purrr)\ndata(construction)\nsummary(fish_encounters)")
annotate_pkg_datasets(test_string)
#> [1] "library(tidyr) # construction fish_encounters\nlibrary(purrr) # No loaded datasets found\ndata(construction)\nsummary(fish_encounters)"