Learn R Programming

rmake (version 1.2.0)

prerequisites: Return given set of properties of all rules in a list

Description

targets() returns a character vector of all unique values of target properties, prerequisites() returns depends and script properties, and tasks() returns task properties of the given rule() or list of rules.

Usage

prerequisites(x)

targets(x)

tasks(x)

terminals(x)

Value

A character vector of unique values of the selected property obtained from all rules in x

Arguments

x

An instance of the rmake.rule class or a list of such instances

Author

Michal Burda

Details

terminals() returns only such targets that are not prerequisites to any other rule.

See Also

rule()

Examples

Run this code
job <- 'data.csv' %>>%
  rRule('process.R', task='basic') %>>%
  'data.rds' %>>%
  markdownRule('report.Rnw', task='basic') %>>%
  'report.pdf'

prerequisites(job)    # returns c('process.R', data.csv', 'report.Rnw', 'data.rds')
targets(job)          # returns c('data.rds', 'report.pdf')
tasks(job)            # returns 'basic'

Run the code above in your browser using DataLab