add_component: Add a network component

add_componentR Documentation

Add a network component

Description

component adds one or more network components to a configuration.

Usage

add_component(component, configuration = NULL, group_size = NULL, ...)

Arguments

component

A square adjacency matrix, two-column edge list or other object that can be converted to a configuration or configuration_set.

configuration

A configuration or other object that can be converted to a configuration. If NULL, a configuration is built using the provideed component(s).

group_size

The size for the returned configuration. Ignored if a configuration is given.

Details

A component is the full subset of connected vertices (or nodes) in a network which is unconnected to other subsets. If a configuration is provided, components are added as block diagonals to available space (i.e., 0-value blocks) in the configuration. If no configuration nor group_size are given, the components are combined block-diagonally into one configuration.

Value

A configuration object.

See Also

configuration, configuration_set

Examples

f <- configuration(cbind(c(1,2),c(2,1)), group_size = 8, input_type = "edgelist")
m <- matrix(c(0,1,1,1,0,0,1,0,0), 3)
add_component(m, f)
m_ls <- list(m, matrix(c(0,1,0,1,0,1,0,1,0), 3))
add_component(m_ls, group_size = 7)
add_component(m_ls, description = "2 components")

stephen-l-jones/SmallGroupNetwork documentation built on April 25, 2022, 11:15 p.m.