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

Description Usage Arguments Value

View source: R/tempflow-basics.R

Description

Is a function that takes a 'tempflow'-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.

Usage

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

Arguments

tempFlow

A 'tempflow'-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 given 'tempflow'-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 lenght 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 condition are checked (e.g. duplicate names, cycles, ... ).

Value

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


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