Learn R Programming

targets (version 0.0.0.9000)

tar_deps: Code dependencies

Description

List the dependencies of a function or expression.

Usage

tar_deps(expr)

Arguments

expr

A quoted R expression or function.

Value

Character vector of the dependencies of a function or expression.

Details

targets detects the dependencies of commands using static code analysis. Use tar_deps() to run the code analysis and see the dependencies for yourself.

Examples

Run this code
# NOT RUN {
tar_deps(x <- y + z)
tar_deps({
  x <- 1
  x + a
})
tar_deps(function(a = b) map_dfr(data, ~do_row(.x)))
# }

Run the code above in your browser using DataLab