AddEdge.ProgressionGraph: Adds edges to an object of type 'ProgressionGraph'

Description Usage Arguments Value

View source: R/progressionGraph.R

Description

Adds edges to an object of type ProgressionGraph ensuring that the graph remains a DAG. An exception is thrown if a cycle is introduced or an edge which already exists is attempted to be added

Usage

1
2
AddEdge.ProgressionGraph(object, fromNodeNames, toNodeNames,
  isResetEdge = FALSE)

Arguments

object

the ProgressionGraph to add new edges

fromNodeNames

a vector of starting nodes of edges

toNodeNames

a vector of ending nodes of edges. For example An edge is added between fromNodeNames[i] to toNodeNames[i] for all i

isResetEdge

logical value for whether these edges are edges for which patient time switches are reset (this wouldbe true, in case of crossing over onto a different arm and then requiring a lag before the new treatment kicks in)

Value

a new ProgressionGraph with the new edges added

If an edge is attempted to be added twice, e.g. AddEdge.ProgressionGraph <- (g,from=c("a","a"),to=c("b","b")) it will only be added once.

If an edge already exists then a warning message will be displayed


scientific-computing-solutions/badminton documentation built on May 29, 2019, 3:43 p.m.