drake_deps function

drake_deps helper

drake_deps helper

Static code analysis.

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.

Returns

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