inferGraph: Infer Task Dependency Graph

Description Usage Arguments Value Examples

Description

Statically analyze code to determine implicit dependencies

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
inferGraph(code, time, ...)

## S4 method for signature 'character,missing'
inferGraph(code, time, ...)

## S4 method for signature 'language,missing'
inferGraph(code, time, ...)

## S4 method for signature 'expression,missing'
inferGraph(code, time, ...)

## S4 method for signature 'ANY,numeric'
inferGraph(code, time, ...)

Arguments

code

the file path to a script or an object that can be coerced to an expression.

time

time to run each expression

...

additional arguments to methods

Value

object of class TaskGraph

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
g <- inferGraph(parse(text = "
  a <- 1
  b <- 2
  c <- a + b
  d <- b * c
"))

ig <- as(g, "igraph")
plot(ig)

# To specify the time each expression takes:
g2 <- inferGraph(g@code, time = c(1.1, 2, 0.5, 6))

clarkfitzg/makeParallel documentation built on Nov. 21, 2020, 2:35 a.m.