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

Description Usage Arguments Value

View source: R/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 to the values given by the "weightList"-vector.

Usage

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

Arguments

tempFlow

A 'tempflow'-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 '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.