getOverlapSummary: getOverlapSummary

View source: R/getOverlapSummary.R

getOverlapSummaryR Documentation

getOverlapSummary

Description

getOverlapSummary summarizes the number of species necessary for each function including means, SDs, and other metrics

Usage

getOverlapSummary(
  overData,
  m = 2,
  type = "positive",
  index = "sorensen",
  denom = "set"
)

Arguments

overData

Matrix of functions and which species affect them from getRedundancy.

m

Number of functions. Defaults to 2.

type

Are the kinds of effects we're looking at "positive", "negative" or "all".

index

Type of overlap index to be used by getOverlap.

denom

Type of denominator to be used by getOverlap.

Details

getOverlapSummary takes a matrix of 1s and -1s, and depending on whether we're interested in positive, negative, or both types of interactions looks for the m-wise overlap between species and then reports summary metrics of mean overlap, SD, and number of combinations

Value

Returns a data frame of the mean overlap, SD, and number of possible combinations.

Author(s)

Jarrett Byrnes.

Examples

data(all_biodepth)
allVars <- qw(biomassY3, root3, N.g.m2, light3, N.Soil, wood3, cotton3)

germany <- subset(all_biodepth, all_biodepth$location == "Germany")

vars <- whichVars(germany, allVars)
species <- relevantSp(germany, 26:ncol(germany))

# re-normalize N.Soil so that everything is on the same
# sign-scale (e.g. the maximum level of a function is
# the "best" function)
germany$N.Soil <- -1 * germany$N.Soil + max(germany$N.Soil, na.rm = TRUE)

res.list <- lapply(vars, function(x) sAICfun(x, species, germany))
names(res.list) <- vars

redund <- getRedundancy(vars, species, germany)

getOverlapSummary(redund, m = 2)


#########
# getOverlapSummary takes a matrix of 1s and -1s, and depending on whether we're
# interested in positive, negative, or both types of interactions looks for the
# m-wise overlap and then reports summary metrics of mean overlap, SD, and number of combinations
#########

jebyrnes/multifunc documentation built on May 25, 2022, 9:43 p.m.