Skip to content

Instantly share code, notes, and snippets.

@pedroj
Created March 26, 2013 01:36
Show Gist options
  • Save pedroj/5242412 to your computer and use it in GitHub Desktop.
Save pedroj/5242412 to your computer and use it in GitHub Desktop.
params
# Parameters
# Function to estimate network parameters.
require(bipartite)
params <- function(mat)
# Obtain basic parameters from an interaction matrix
# From library(bipartite) functions. We are getting just 8 indexes.
{networklevel(mat, #tapis
index=c(# "species",
"connectance", #1-C
"web asymmetry", #2-WA
# "links per species",
# "number of compartments",
# "compartment diversity",
# "cluster coefficient",
"weighted cluster coefficient", #3-WCC
# "degree distribution",
# "mean number of shared partners",
# "togetherness",
# "C score",
# "V ratio",
# "discrepancy",
"nestedness", #4-N
# "weighted nestedness",
"weighted NODF", #5-wNODF
# "extinction slope",
# "robustness",
# "ISA",
# "SA",
# "niche overlap",
# "generality,vulnerability",
"linkage density", #6-LD
# "Fisher alpha",
# "mean interaction diversity",
"interaction evenness", #7-IE
# "Alatalo interaction evenness",
"diversity"), #8-H
# "H2"
ISAmethod="Bascompte", SAmethod = "log", CCfun=median,
normalise=TRUE, empty.web=TRUE, logbase="e", intereven="sum")
}
#------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment