price.part.single: Low-level wrapper function for applying Price partition to a...

Description Usage Arguments Value Examples

View source: R/Price_FUNCTIONS.R

Description

Given a list of species names and their functions, and a reference community, calculate the full set of Price partition components and return them. This is a low-level function used inside of higher-level functions (ie, price.part.all()) that automate the pairwise comparison of many communities.

Usage

1
price.part.single(sps, func, commX)

Arguments

sps

A vector of species' names

func

A numerical vector of species' functions

commX

A reference or 'baseline' community

Value

This function returns a matrix with a single row, and columns consisting of Price equation components.

Examples

1
2
3
4
5
6
# Generate mock community data:
set.seed(36)
cm1<-data.frame(sps=LETTERS[seq(1,6)],func=rpois(6,lambda = 2))
cm2<-data.frame(sps=LETTERS[seq(1,6)],func=rpois(6,lambda = 2))

price.part.single(sps=cm2$sps,func=cm2$func,commX=cm1)

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