Learn R Programming

meconetcomp (version 0.6.1)

subset_network: 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)

Value

trans_network object, with only the extracted edges in the network

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.

Examples

Run this code
# \donttest{
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
# }

Run the code above in your browser using DataLab