set_step_weights_from_id.tempnetwork: Given a vector containing the current step-ids and a vector...

Description Usage Arguments Value

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

Description

Given a vector containing the current step-ids and a vector containing numeric values (excluding NA, NaN and NULL), this function sets the weights of the specified steps in the 'tempflow'-object (of the given 'tempnetwork'-object) to the values given by the "weightList"-vector.

Usage

1
2
3
## S3 method for class 'tempnetwork'
set_step_weights_from_id(tempNetwork,
  stepIDList = NULL, weightList = NULL, safe = TRUE)

Arguments

tempNetwork

A 'tempnetwork'-object.

stepIDList

A vector containing the step-ids of the steps which weights ought to be changed.

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 "stepIDList"-vector.

safe

If TRUE, it will be ensured that the specified step-ids exist; that the "weightList"-vector' is either of length 1 or has the same length as the "stepIDList"-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 in the "stepIDList"-vector are assigned the weights given by the "weightList"-vector.


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