comp.sel: Calculate estimates of Complementarity and Selection

Description Usage Arguments Value Examples

View source: R/complementarity_and_selection.R

Description

Calculate the complementarity and selection effects (Loreau & Hector 2001) given data on the abundance of species grown in mono- and poly-culture.

Usage

1
comp.sel(data, even.seeding = FALSE)

Arguments

data

This is a data frame containing columns 'mono' (species' monoculture abundance), 'mixed' (species polyculture abundance), and 'init.mixed' (initial relative abundance of species in polyculture)

even.seeding

If no 'init.mixed' column is provided, and even.seeding is set to TRUE, equal relative abundances are inferred within the function

Value

CE the complementarity effect

SE the selection effect

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
Format 1:
set.seed(1)
d1<-data.frame(sps=c('A','B','C','D','E'),mono=1+runif(5),init.mixed=1/5,mixed=1+runif(5,min=0.2))

comp.sel(d1)

# Format 2:
set.seed(1)
d2<-data.frame(sps=c('A','B','C','D','E'),mono=1+runif(5),mixed=1+runif(5,min=0.2))

comp.sel(d2,even.seeding = T)

ctkremer/priceTools documentation built on May 28, 2019, 7:49 p.m.