subset_network: Extract subset of network according to the edge intersection...

View source: R/subset_network.R

subset_networkR Documentation

Extract subset of network according to the edge intersection of networks

Description

Extracting a network according to the edge intersection of networks.

Usage

subset_network(network_list, venn = NULL, name = NULL)

Arguments

network_list

a list with multiple networks; all the networks should be trans_network object created from trans_network class of microeco package.

venn

default NULL; a microtable object which must be converted by trans_comm function of trans_venn class.

name

default NULL; integer or character; must be a number or one of colnames of the otu_table in the input venn parameter.

Value

trans_network object, with only the extracted edges in the network

Examples


data(soil_amp_network)
# first obtain edge distribution
tmp <- edge_comp(soil_amp_network)
# obtain edge intersection using trans_venn class
tmp1 <- microeco::trans_venn$new(tmp)
# convert intersection result to microtable object
tmp2 <- tmp1$trans_comm()
# extract the intersection of all the three networks ("IW", "TW" and "CW")
test <- subset_network(soil_amp_network, venn = tmp2, name = "IW&TW&CW")
# test is a trans_network object


meconetcomp documentation built on Nov. 18, 2023, 5:06 p.m.