readMultiplex: Read ecological multiplex networks using different files for...

Description Usage Arguments Value See Also Examples

View source: R/readNetwork.r

Description

This functions uses readNetwork() to read files that represent network layers that can be different interaction types, represented by the type attribute of the igraph object.

Usage

1
2
3
readMultiplex(fileName, types = c("Competitive", "Mutualistic",
  "Trophic"), filePath = NULL, fhead = TRUE, skipColumn = 1,
  format = "layers")

Arguments

fileName

vector of fileNames with the layers of the networks

types

vector of types that represent the layers

filePath

path of the files NULL by default

fhead

TRUE if the files have header fields, FALSE otherwise.

format

string, "layers" is the default were diferent layers are coded as different files there must be the same number of files as the length of the types vector as each type represent a layer. "GLV" Represent multiple intarction types as pairs of entries in a matrix so competition is represented as ai,j= -1, aj,i=-1, predation ai,j=1,aj,i=-1 where species j is the predator. Mutualism is ai,j=aj,i=1. Any negative or positive number works because intensity of interactions are not registered.

skipColum

integer, number of columns that are skiped 1 by default

Value

an mgraph object that is a list of igraph objects with the type attribute set to each kind of layer or interaction

See Also

readNetwork()

Examples

1
2
3
4
5
6
7
8
9
# Read a vector of files
#
## Not run: 

fpath <- system.file("extdata", package = "multiweb")
dn <- list.files(fpath,pattern = "^Kefi2015.*\\.txt$")
netData <- readMultiplex(dn,c("Competitive","Mutualistic","Trophic"),fpath,skipColum=2)

## End(Not run)

lsaravia/EcoNetwork documentation built on Oct. 26, 2020, 11:09 p.m.