These functions return logical vectors the length of the nodes in a network identifying which hold certain properties.
node_is_cutpoint()
and node_is_isolate()
are useful for identifying
nodes that are in particular positions in the network.
More can be added here.
node_is_max()
and node_is_min()
are more generally useful
for converting the results from some node measure into a mark-class object.
They can be particularly useful for highlighting which node or nodes
are key because they minimise or, more often, maximise some measure.
node_is_cutpoint(.data)
node_is_isolate(.data)
node_is_core(.data)
node_is_random(.data, size = 1)
node_is_mentor(.data, elites = 0.1)
node_is_max(node_measure, ranks = 1)
node_is_min(node_measure, ranks = 1)
An object of a {manynet}
-consistent class:
matrix (adjacency or incidence) from {base}
R
edgelist, a data frame from {base}
R or tibble from {tibble}
igraph, from the {igraph}
package
network, from the {network}
package
tbl_graph, from the {tidygraph}
package
The number of nodes to select (as TRUE).
The proportion of nodes to be selected as mentors. By default this is set at 0.1. This means that the top 10% of nodes in terms of degree, or those equal to the highest rank degree in the network, whichever is the higher, will be used to select the mentors.
Note that if nodes are equidistant from two mentors, they will choose one at random. If a node is without a path to a mentor, for example because they are an isolate, a tie to themselves (a loop) will be created instead. Note that this is a different default behaviour than that described in Valente and Davis (1999).
An object created by a node_
measure.
The number of ranks of max or min to return.
For example, ranks = 3
will return TRUE for nodes with
scores equal to any of the top (or, for node_is_min()
, bottom)
three scores.
By default, ranks = 1
.
node_is_cutpoint()
: Returns logical of which nodes cut
or act as articulation points in a network,
increasing the number of connected components in a graph when removed.
node_is_isolate()
: Returns logical of which nodes are isolates,
with neither incoming nor outgoing ties.
node_is_core()
: Returns logical of which nodes are members
of the core of the network.
node_is_random()
: Returns a logical vector
indicating a random selection of nodes as TRUE.
node_is_mentor()
: Returns a logical vector
indicating mentor (high indegree) nodes as TRUE.
node_is_max()
: Returns logical of which nodes
hold the maximum of some measure
node_is_min()
: Returns logical of which nodes
hold the minimum of some measure
Valente, Thomas, and Rebecca Davis. 1999. "Accelerating the Diffusion of Innovations Using Opinion Leaders", Annals of the American Academy of Political and Social Science 566: 56-67.
node_is_cutpoint(ison_brandes)
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11
#> 1 FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE
node_is_isolate(ison_brandes)
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11
#> 1 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
node_is_core(ison_brandes)
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11
#> 1 FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE
node_is_random(ison_brandes, 2)
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11
#> 1 FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE TRUE FALSE
node_is_max(node_degree(ison_brandes))
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11
#> 1 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE FALSE FALSE
node_is_min(node_degree(ison_brandes))
#> V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11
#> 1 TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE