idgroup | R Documentation |
Outputs group numbers given ID numbers for a two-group network.
idgroup(nw, ids)
nw |
Object of class |
ids |
Vector of ID numbers for which the group number should be returned. |
A vector containing the group number for each of the specified nodes.
nw <- network_initialize(n = 10)
nw <- set_vertex_attribute(nw, "group", rep(1:2, each = 5))
idgroup(nw)
idgroup(nw, ids = c(3, 6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.