niche: Functions for determining the niche of species

nicheR Documentation

Functions for determining the niche of species

Description

Functions for determining the niche of species

Usage

## S3 method for class 'species'
f_niche(x, R, N, component = c("lambda", "col", "ext"))

## S3 method for class 'metacommunity'
f_niche(x, R, N, component = c("lambda", "col", "ext"))

Arguments

x

A species() or metacommunity()

R

A site by resource matrix, not needed if N is supplied

N

A niche axis matrix; if not supplied, will be computed by transforming R

component

One of "lambda", "col", or "ext" specifying whether the total niche (C - E), only C, or only E should be returned

Value

A vector (for a single species) or matrix (for a metacommunity) giving the value(s) of the niche at each site

Examples

comm = metacommunity()
st = matrix(seq(0, 1, length.out = 4), ncol = 1, dimnames = list(NULL, 'R'))

# for a single species
f_niche(comm$species[[1]], st)

# for multiple species
f_niche(comm, st)

flee-group/flume documentation built on Jan. 29, 2024, 6:44 p.m.