make_NM {netcom}R Documentation

Make a Niche Model network

Description

Creates a single network according to the Niche Model. Can be directed or undirected, but is always unweighted.

Usage

make_NM(
  size,
  niches,
  net_kind = "matrix",
  connectance = 0.1,
  directed = TRUE,
  grow = FALSE
)

Arguments

size

The number of nodes in the network. Must be a positive integer.

niches

A vector of numbers specifying the niche of each member of the system (node). Each niche value must be element of [0,1].

net_kind

The format of the network. Currently must be either 'matrix' or 'list'.

connectance

Defaults to 0.5. The ratio of actual interactions to possible interactions. Effects the beta distributed width of niche values each member of the system (node) interacts with.

directed

If FALSE all interactions will be made symmetric. Note that the process of creating interactions is unaffected by this choice. Defaults to TRUE.

grow

Binary argument that determines if the network should be made in a growing fashion, where nodes' edges are added in order of their niches and can only attach to previously considered nodes. Defaults to FALSE.

Value

An interaction matrix format of a Niche Model network.

References

Williams, R. J., & Martinez, N. D. (2000). Simple rules yield complex food webs. Nature, 404(6774), 180-183.

Examples

# Import netcom
library(netcom)

# Network size (number of nodes)
size <- 10

# Create niche values for each member of the system (node)
niches <- stats::runif(n = size)

# Make network according to the Niche Model
make_NM(size = size, niches = niches)


[Package netcom version 2.1.7 Index]