att_from_rmd: Get all dependencies from a Rmd file

Description Usage Arguments Value Examples

View source: R/att_from_rmds.R

Description

Get all dependencies from a Rmd file

Usage

1
2
3
4
5
6
7
8
att_from_rmd(
  path,
  temp_dir = tempdir(),
  warn = -1,
  encoding = getOption("encoding"),
  inside_rmd = FALSE,
  inline = TRUE
)

Arguments

path

Path to a Rmd file

temp_dir

Path to temporary script from purl vignette

warn

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

encoding

Encoding of the input file; always assumed to be UTF-8 (i.e., this argument is effectively ignored).

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

vector of character of packages names found in the Rmd

Examples

1
2
3
dummypackage <- system.file("dummypackage",package = "attachment")
# browseURL(dummypackage)
att_from_rmd(path = file.path(dummypackage,"vignettes/demo.Rmd"))

attachment documentation built on Nov. 16, 2021, 9:17 a.m.