toGLVadjMat: From multiple interaction object 'mgraph'to GLV adjacency...

View source: R/readNetwork.r

toGLVadjMatR Documentation

From multiple interaction object 'mgraph'to GLV adjacency matrix

Description

This functions takes a 'mgraph' object and convert it to a Generalized Lotka-Volterra adjacency matrix Position is important in fact the order is Competitive/Negative,Mutualistic/Positive,Trophic/Antagonistic If 'istrength' is TRUE the attribute weight is assumed as the strength of the interacion

Usage

toGLVadjMat(
  mg,
  types = c("Negative", "Positive", "Antagonistic"),
  istrength = FALSE
)

Arguments

mg

multiple interaction object, class 'mgraph'

types

vector of types that represent the layers

istrength

edge weights

Value

an matrix with the signs of the interactions

See Also

readMultiplex()

Examples


# Read a vector of files
#
## Not run: 

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

## End(Not run)

lsaravia/EcoNetwork documentation built on Nov. 12, 2023, 5:34 p.m.