induced_submat {ergmito}R Documentation

Extract a submatrix from a network

Description

This is similar to network::get.inducedSubgraph. The main difference is that the resulting object will always be a list of matrices, and it is vectorized.

Usage

induced_submat(x, v, ...)

Arguments

x

Either a list or single matrices or network objects.

v

Either a list or a single integer vector of vertices to subset.

...

Currently ignored.

Details

Depending on the lengths of x and v, the function can take the following strategies:

Value

A list of matrices as a result of the subsetting.

Examples

x <- rbernoulli(100)
induced_submat(x, c(1, 10, 30:50))

x <- rbernoulli(c(20, 20))
induced_submat(x, c(1:10))


[Package ergmito version 0.3-1 Index]