set_vertex_names.tempnetwork: This function allows one to change the names of vertices in a...

Description Usage Arguments Value

View source: R/tempnetwork-setter.R

Description

This function allows one to change the names of vertices in a graph from the graph-list provided by the given 'tempnetwork'-object. For each (point, equivalence-class, string)-pair (which is constructed by considering the corresponding entries in the "pointNameList"-, "tVertexNameList"- and "newVertexNameList"-vector) the following is done. Using the point the relecant graph from the graph-list of the given 'tempnetwork'-object will be selected. Then the first two elements will be used to determine the old name of vertex. Using those two the vertex will be renamed in the chosen graph. Moreover, the entry in respective the equivalence-class will be updated as will.

Usage

1
2
3
4
## S3 method for class 'tempnetwork'
set_vertex_names(tempNetwork, pointNameList,
  tVertexNameList, newVertexNameList = NULL, changeEquivRel = TRUE,
  safe = TRUE)

Arguments

tempNetwork

A 'tempnetwork'-object.

pointNameList

A vector of string, representing the names of points in the 'tempflow'-object of the given 'tempnetwork'-object.

tVertexNameList

A vector of string, representing the names of equivalence-classes in the equivalence-relation of the given 'tempnetwork'-object.

newVertexNameList

A vector of strings, representing the new names of specified the vertices. If NULL, a vector containing the string encoding of the indices of the specified vertices in their respective graphs will be computed. E.g. if a vertex is indexed 3 in the vertex set of the 'igraph'-object, the vector will contain "3" at the position attributed to that vertex.

changeEquivRel

If TRUE, the entries in the equivalence-relation of the given 'tempnetwork'-object will be updated as well.

safe

If TRUE it will be ensured that "pointNameList" and "tVertexNameList" are equal in length; if not NULL the vector "newVertexNameList" has the same length as the vector "tVertexNameList"; that the specified points and equivalence-classes exist.

Value

A 'tempnetwork'-object containing the same 'tempflow'-object as the given 'tempnetwork'-object. a graph-list constructed by changing the vertex names of the graphs in the graph-list of the given 'tempnetwork'-object; a possibly updated equivalence-relation constructed by changing the values of the equivalence-relation from the given 'tempnetwork'-object.


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