Description Usage Arguments Value Examples

View source: R/assign_group_membership.R

Assign group membership to nodes

1 2 | ```
assign_group_membership(N, K, place_randomly = FALSE,
ensure_all_groups_seen = TRUE)
``` |

`N` |
Total number of nodes |

`K` |
Total number of groups or clusters |

`place_randomly` |
Do we want to randomly sample group membership for nodes? Defaults to |

`ensure_all_groups_seen` |
If |

An array of memberships of length `N`

made up of `K`

groups as encoded with integers

1 2 3 | ```
assign_group_membership(10, 3)
assign_group_membership(10, 4, place_randomly = TRUE)
assign_group_membership(10, 4, place_randomly = TRUE, ensure_all_groups_seen = FALSE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.