drake_deps: 'drake_deps' helper

View source: R/s3_drake_deps.R

drake_depsR Documentation

drake_deps helper

Description

Static code analysis.

Usage

drake_deps(expr, exclude = character(0), restrict = NULL)

Arguments

expr

An R expression

exclude

Character vector of the names of symbols to exclude from the code analysis.

restrict

Optional character vector of allowable names of globals. If NULL, all global symbols are detectable. If a character vector, only the variables in restrict will count as global variables.

Value

A drake_deps object.

Examples

if (FALSE) { # stronger than roxygen dontrun
expr <- quote({
  a <- base::list(1)
  b <- seq_len(10)
  file_out("abc")
  file_in("xyz")
  x <- "123"
  loadd(abc)
  readd(xyz)
})
drake_deps(expr)
}

drake documentation built on Nov. 6, 2023, 5:09 p.m.