add_gedges.tempnetwork: This function allows one to add edges to specified graphs...

Description Usage Arguments Value

View source: R/tempnetwork-basic.R

Description

This function allows one to add edges to specified graphs from the graph-list of the given 'tempnetwork'-object. The vectors "pointNameList", "startTVertexList" and "endTVertexList" must all be of equal length, as their entries correspond with each other That is, the i-th entry from the vector "pointNameList" specifies the graph to which the i-th edge ought to be added, while "startTVertexList" and "endTVertexList" characterise the start- and end-vertex of the i-th edge.

Usage

1
2
3
## S3 method for class 'tempnetwork'
add_gedges(tempNetwork, pointNameList,
  startTVertexList, endTVertexList, weightList = NULL, safe = TRUE)

Arguments

tempNetwork

A 'tempnetwork'-object.

pointNameList

A vector of strings representing the names of points in the 'tempflow'-object of the given 'tempnetwork'-object.

startTVertexList

A vector of strings representing the names equivalence-classes in the equivalence-relation of the given 'tempnetwork'-object. Using the corresponding entries in the "pointNameList"-vector, said equivalence-realtion will be queried to determine the start-vertices of the edges to be added.

endTVertexList

A vector of strings representing the names equivalence-classes in the equivalence-relation of the given 'tempnetwork'-object. Using the corresponding entries in the "pointNameList"-vector, said equivalence-realtion will be queried to determine the end-vertices of the edges to be added.

weightList

A vector that can be used to add a certain value to the corresponding edges "weight" attribute.

safe

If TRUE, it will be ensured that the vectors "pointNameList", "startTVertexList" and "endTVertexList" are of equal length; the vector "weightList" is either of length 1 or of the same length as the other vectors.

Value

A new 'tempnetwork'-object, containing the same 'tempflow'-object as provided through the given 'tempnetwork'-object; a new graph-list constructed by extending the graphs from the graph-list of the given 'tempnetwork'-object, with the edges specified in the input; the same equivalence-relation as provided through the given 'tempnetwork'-object. Additionally, the "tempGraph"-field will be set to NULL.


KonstantinRK/tempnetwork documentation built on Dec. 23, 2019, 6:40 p.m.