addRandomGroups: Adds the vertex attribute "group" to each vertex in an igraph...

Description Usage Arguments Value Examples

View source: R/saviUserFunctions.R

Description

Adds the vertex attribute "group" to each vertex in an igraph randomly.

Usage

1
addRandomGroups(g, numOfVertexGroups)

Arguments

g

The igraph to add vertex groups to.

numOfVertexGroups

The desired number of vertex groups for the graph. It is required that this number be greater than 1 or the function runSavi will throw an error. It is recommended that the number be less than the number of verticies in the graph.

Value

The given igraph with each vertex in a random group.

Examples

1

nsimone101/savi documentation built on July 1, 2020, 4:53 a.m.