att_from_rmds: Get all packages called in vignettes folder

View source: R/att_from_rmds.R

att_from_rmdsR Documentation

Get all packages called in vignettes folder

Description

Get all packages called in vignettes folder

Usage

att_from_rmds(
  path = "vignettes",
  pattern = "*.[.](Rmd|rmd|qmd)$",
  recursive = TRUE,
  warn = -1,
  inside_rmd = FALSE,
  inline = TRUE
)

att_from_qmds(
  path = "vignettes",
  pattern = "*.[.](Rmd|rmd|qmd)$",
  recursive = TRUE,
  warn = -1,
  inside_rmd = FALSE,
  inline = TRUE
)

Arguments

path

path to directory with Rmds or vector of Rmd files

pattern

pattern to detect Rmd files

recursive

logical. Should the listing recurse into directories?

warn

-1 for quiet warnings with purl, 0 to see warnings

inside_rmd

Logical. Whether function is run inside a Rmd, in case this must be executed in an external R session

inline

Logical. Default TRUE. Whether to explore inline code for dependencies.

Value

Character vector of packages called with library or require. knitr and rmarkdown are added by default to allow building the vignettes if the directory contains "vignettes" in the path

Examples

dummypackage <- system.file("dummypackage",package = "attachment")
# browseURL(dummypackage)
att_from_rmds(path = file.path(dummypackage,"vignettes"))

attachment documentation built on Sept. 19, 2022, 5:07 p.m.