View source: R/layout-groups.R
| layout_groups | R Documentation |
Places the nodes by group membership. The group centers lie on a circle around (0.5, 0.5), starting at the top and proceeding counterclockwise in the order of the group levels. A single group is centered at (0.5, 0.5). The nodes of each group lie on a circle around their group center, and a group with one node is placed at its center.
layout_groups(
network,
groups,
group_positions = NULL,
inner_radius = 0.15,
outer_radius = 0.35
)
network |
A |
groups |
Vector of group memberships, one per node (numeric, character, or factor). A length different from the number of nodes raises an error. |
group_positions |
Optional list or data frame with columns |
inner_radius |
Radius of the circle of nodes within each group. Default 0.15. |
outer_radius |
Radius of the circle of group centers. Default 0.35. |
A data frame with columns x and y and one row per
node, in node order.
layout_groups(CographNetwork$new(regulation_net),
groups = rep(c("A", "B"), each = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.