uncombine_network: Split up a network into a list of subgraphs

Description Usage Arguments Value See Also Examples

View source: R/combine.networks.R

Description

Given a network created by combine_networks(), uncombine_network() returns a list of networks, preserving attributes that can be preserved.

Usage

1
2
3
4
5
6
7
8
9
uncombine_network(
  nw,
  ignore.nattr = c("bipartite", "directed", "hyper", "loops", "mnext", "multiple", "n",
    ".subnetcache"),
  ignore.vattr = c(),
  ignore.eattr = c(),
  split.vattr = ".NetworkID",
  names.vattr = NULL
)

Arguments

nw

a network::network created by combine_networks().

ignore.nattr, ignore.vattr, ignore.eattr

network, vertex, and edge attributes not to be processed as described below.

split.vattr

name of the vertex attribute on which to split.

names.vattr

optional name of the vertex attribute to use as network names in the output list.

Value

a list of network::networks containing subgraphs on split.vattr. In particular,

If split.vattr is a vector, only the first element is used and it's "popped".

See Also

split.network()

Examples

1
2
3
4
5
6
data(samplk)

o1 <- combine_networks(list(samplk1, samplk2, samplk3))
image(as.matrix(o1))

ol <- uncombine_network(o1)

tergm documentation built on July 28, 2021, 5:10 p.m.