add_steps.tempnetwork: Is a function that takes a 'tempnetwork'-object and two...

Description Usage Arguments Value

View source: R/tempnetwork-tempflow-basics.R

Description

Is a function that takes a 'tempnetwork'-object and two vectors of point-names (or point-ids) and adds new steps, in between the points specified by the "srcPointList"-vector and the corresponding points specified by the "dstPointList"-vector, to the 'tempflow'-object of the given 'tempnetwork'-object.

Usage

1
2
3
## S3 method for class 'tempnetwork'
add_steps(tempNetwork, srcPointList, dstPointList,
  weightList = NULL, attrList = NULL, safe = TRUE)

Arguments

tempNetwork

A 'tempnetwork'-object.

srcPointList

A vector containing the point-names (or point-ids) of the points from which the new edges should start.

dstPointList

A vector containing the point-names (or point-ids) of the points at which the new edges should end.

weightList

Is a vector containing numeric values (excluding NA, NaN and NULL) representing the step-weights of the newly introduced steps If left NULL, every newly introduced loop will be assigned the value 0, and every other new edge will be assigned the value 1. Otherwise, it must be either a scalar (i.e. length 1) or a vector with the same length as "srcPointList" and "dstPointList".

attrList

Is a vector to specify other edge atrributes. If left NULL, no attributes (other than weight) will be assigned to the newly introduced steps in time. Otherwise, this list has to be structured as required by the function igraph::add.edges.

safe

If TRUE, it will be ensured that the specified point-names (or point-ids) are present in the 'tempflow'-object of the given 'tempnetwork'-object; the "srcPointList"-vector, the "dstPointList"-vector are of the same length; that the 'weightList'-vector is either of length 1 or has the same length as the "srcPointList"-vector or the "dstPointList"-vector; that the weights of the resulting 'tempflow'-object are non-negative, numerical values. Additionally, the usual tempflow and tempnetwork condition are checked.

Value

A new 'tempnetwork'-object, containing a new 'tempflow'-object constructed by adding the specified edges to the 'tempflow'-object of the given 'tempnetwork'-object.


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