set_step_weights.tempnetwork: Given a two vectors containing the point-names (or point-ids)...

Description Usage Arguments Value

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

Description

Given a two vectors containing the point-names (or point-ids) representing the start- and end-points of edges and a vector containing numeric values (excluding NA, NaN and NULL), this function sets the weights of the specified steps to the values given by the "weightList"-vector. If either "srcPointList" or "dstPointList" is NULL, alls steps will be considered.

Usage

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

Arguments

tempNetwork

A 'tempnetwork'-object.

srcPointList

The vector containing the names (or ids) representing the start-points of the desired edges.

dstPointList

The vector containing the names (or ids) representing the end-points of the desired edges.

weightList

Is a vector containing numeric values (excluding NA, NaN and NULL) representing the step-weights of the given 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 the "srcPointList"- or "dstPointList"-vector.

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); that the specified steps exist; 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.

Value

A 'tempnetwork'-object, with a 'tempflow'-object where the step-weights of the steps specified by the "srcPointList"- and "dstPointList"-vector are assigned the weights given by the "weightList"-vector.


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