R: Rescale numeric node attribute values for nodes in a...
rescale_node_attr_in_selection
R Documentation
Rescale numeric node attribute values for nodes in a selection
Description
From a graph object of class dgr_graph, take a set of
numeric values for node attributes specified in a selection of nodes,
rescale to a new numeric or color range, then write a new set of node
attribute values.
a graph object of class dgr_graph that is created using
create_graph.
node_attr_from
the node attribute containing numeric data that
is to be rescaled to new numeric or color values.
node_attr_to
the name of the new or existing node attribute that
will contain the scaled values. If the node attribute exists for the
selected nodes, rescaled values will replace any existing values.
to_lower_bound
the lower bound value for the set of rescaled
values. This can be a numeric value or an X11 color name.
to_upper_bound
the upper bound value for the set of rescaled
values. This can be a numeric value or an X11 color name.
from_lower_bound
an optional, manually set lower bound value for
the set of values to be rescaled. If not set, the minimum value of the set of
values to be rescaled will be used.
from_upper_bound
an optional, manually set upper bound value for
the set of values to be rescaled. If not set, the minimum value of the set of
values to be rescaled will be used.