Skip to contents

Annotate package datasets

Usage

annotate_pkg_datasets(string_og)

Arguments

string_og

text string (script) with package load calls

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.

Details

No support for pacman package loading at this time.

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)"