Learn R Programming

concorR (version 0.2.0)

concor_igraph_apply: Find CONCOR partition and add to a list of igraph objects

Description

Takes a list of igraph objects, runs concor until the desired number of splits, and adds the final split to each object as a vertex attribute.

Usage

concor_igraph_apply(igraph_list, nsplit = 1)

Arguments

igraph_list

The list of igraph objects for use in concor.

nsplit

Number of times to split each network.

Value

Returns a list of igraph objects, each with a vertex attribute csplitn (where n is nsplit) that contains the block assignment obtained from concor.

Details

This function is a wrapper for a common task: Running concor on one or more igraph objects and adding the resulting partition to each object as a vertex attribute. If multiple igraph objects are included in the input list, they should be multiple relations for the same nodes.

See Also

concor, concor_make_igraph

Examples

Run this code
# NOT RUN {
a <- matrix(c(0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0), ncol = 4)
rownames(a) <- c("a", "b", "c", "d")
colnames(a) <- c("a", "b", "c", "d")
a.igraph <- igraph::graph_from_adjacency_matrix(a)

concor_igraph_apply(list(a.igraph))
# }

Run the code above in your browser using DataLab