Get all packages called in examples from R files
Usage
att_from_examples(dir.r = "R", encoding = getOption("encoding"))Arguments
- dir.r
path to directory with R scripts.
- encoding
Encoding passed to
readLines()when reading source files. Defaults togetOption("encoding")so the system locale is respected, matchingatt_from_rscript().
Examples
dummypackage <- system.file("dummypackage",package = "attachment")
# browseURL(dummypackage)
att_from_examples(dir.r = file.path(dummypackage,"R"))
#> [1] "utils" "stringr"
