smooth_pseudo_nodes | R Documentation |
Construct a smoothed version of the network by iteratively removing pseudo
nodes, while preserving the connectivity of the network. In the case of
directed networks, pseudo nodes are those nodes that have only one incoming
and one outgoing edge. In undirected networks, pseudo nodes are those nodes
that have two incident edges. Equality of attribute values among the two
edges can be defined as an additional requirement by setting the
require_equal
parameter. Connectivity of the network is preserved by
concatenating the incident edges of each removed pseudo node.
smooth_pseudo_nodes(
x,
protect = NULL,
require_equal = NULL,
attribute_summary = "ignore",
store_original_ids = FALSE,
store_original_data = FALSE
)
x |
An object of class |
protect |
An integer vector of edge indices specifying which nodes
should be protected from being removed. Defaults to |
require_equal |
A character vector of edge column names specifying
which attributes of the incident edges of a pseudo node should be equal in
order for the pseudo node to be removed? Defaults to |
attribute_summary |
How should the attributes of concatenated edges
be summarized? There are several options, see
|
store_original_ids |
For each concatenated edge, should the indices of
the original edges be stored as an attribute of the new edge, in a column
named |
store_original_data |
For each concatenated edge, should the data of
the original edges be stored as an attribute of the new edge, in a column
named |
The smoothed network as object of class sfnetwork
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.