removing_and_randomizing: calculates how much of a network's perceived structure is due...

Description Usage Arguments Value Examples

View source: R/removing_and_randomizing.R

Description

This function removes each species in turn, randomizing the resulting matrix and returning the desired metric value for the resulting random subnetworks

Usage

1
2
removing_and_randomizing(network, index, network_level = "higher",
  sums_to_preserve = "both", datatype = "list", nreplicates = 1000)

Arguments

network

Your input object

index

The network-level metric, from bipartite, which you desire to be calculated

network_level

The network level to be removing and randomizing. Currently only 'higher' works

sums_to_preserve

preserve sums of columns, rows, or both

datatype

is it a matrix of interactions, or a list of matrixes?

nreplicates

How many iterations of the randomisation should be done per species removal

Value

gives a dataset of values when you remove a species from a network, and the values obtained when randomising this subnetwork

Examples

1
2
mat <- matrix(nrow =10, ncol =10, sample(c(0,1), 100, prob = c(0.6, 0.4), replace = T))
removing_and_randomizing(network = mat, index = 'modularity', datatype = 'matrix')

hemprichbennett/netReducer documentation built on Aug. 11, 2019, 6:48 a.m.