getMetaweb: Get metaweb

View source: R/getMetaweb.R

getMetawebR Documentation

Get metaweb

Description

Computation of the binary metaweb from a list of graph

Usage

getMetaweb(gList)

Arguments

gList

A list of graph objects of class igraph.

Details

This function computes the metaweb from a list of graph. It computes the union (in the sense of graph theory) of the set of graphs.

Value

getMetaweb returns an object of class igraph.

Author(s)

Authors: Stephane Dray, Vincent Miele, Marc Ohlmann, Wilfried Thuiller Maintainer: Wilfried Thuiller <wilfried.thuiller@univ-grenoble-alpes.fr>

References

Marc Ohlmann, Vincent Miele, Stephane Dray, Loic Chalmandrier, Louise O'Connor & Wilfried Thuiller, Diversity indices for ecological networks: a unifying framework using Hill numbers. Ecology Letters (2019) <doi:10.1111/ele.13221>

Examples

# Generating a set of Erdos-Renyi graphs
library(igraph)
gList <- c()
for(i in 1:4){
  graphLocal <- erdos.renyi.game(60, type = 'gnp', p.or.m=0.1, directed=TRUE)
  V(graphLocal)$name <- as.character(1:60)
  gList <- c(gList, list(graphLocal))
}
names(gList) <- c("A","B","C","D")

## building the metaweb
graphMetaweb <- getMetaweb(gList)

econetwork documentation built on Oct. 21, 2022, 5:10 p.m.