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

prerequisitesR Documentation

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)

Arguments

x

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

Details

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

Value

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

Author(s)

Michal Burda

See Also

rule()

Examples

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'

beerda/rmake documentation built on July 2, 2022, 6:24 p.m.