| DAGTeam {Streamer} | R Documentation |
A Consumer to route incoming tasks through nodes
connected as a directed acyclic graph.
DAGParam(x, ...) DAGTeam(..., dagParam = DAGParam(), teamParam = MulticoreParam(1L)) ## S3 method for class 'DAGTeam' plot(x, y, ...)
x |
A matrix or data.frame with columns ‘From’,
‘To’, or a |
... |
For For |
dagParam |
A |
teamParam |
A |
y |
Unused. |
Use DAGParam and DAGTeam to construct instances of these
classes, with ParallelParam instances created by, e.g.,
MulticoreParam.
See Consumer Methods.
Internal fields of this class are are described with, e.g.,
getRefClass("MulticoreTeam")$fields.
Internal methods of this class are described with
getRefClass("MulticoreTeam")$methods() and
getRefClass("MulticoreTeam")$help().
Martin Morgan mtmorgan@fhcrc.org
Team applies a single function across multiple threads..
df <- data.frame(From = c("A", "A", "B", "C"),
To = c("B", "C", "D", "D"),
stringsAsFactors=FALSE)
dagParam <- DAGParam(df)
dteam <- DAGTeam(A=FunctionConsumer(function(y) y),
B=FunctionConsumer(function(A) -A),
C=FunctionConsumer(function(A) 1 / A),
D=FunctionConsumer(function(B, C) B + C),
dagParam=dagParam)
plot(dteam)
strm <- Stream(Seq(to=10), dteam)
sapply(strm, c)
reset(strm)