species: Creates species

View source: R/community.R

speciesR Documentation

Creates species

Description

Creates species

Usage

species(
  location,
  breadth,
  scale_c,
  scale_e,
  alpha,
  beta,
  r_use,
  r_trans = identity
)

Arguments

location

Location of the niche optimum; one per niche axis

breadth

Niche breadth, or variance-covariance matrix for multivariate

scale_c

Scale of the colonisation portion of the niche

scale_e

Scale of the extinction portion of the niche

alpha

Active dispersal ability

beta

Passive dispersal ability

r_use

Resource use scaling parameter, one per resource axis

r_trans

A transformation function for converting resources into niche dimensions

Details

Creates a species, which is defined by its niche parameters and its colonisation/extinction functions.

Note that for gaussian functions in multiple variables, scale is always a scalar, but location must be a location vector of length nx, and width must be a variance covariance matrix with dim = c(nx, nx).

The resource use function is set automatically by default, but can be set to an arbitrary function; see resource use functions for details on how this function should behave.

Value

An S3 object of class 'species', which contains the following named elements:

  • col: The colonisation function, takes a state matrix R and returns a vector of colonisation rates

  • ext: The extinction function

  • par_c: colonisation niche parameters

  • par_e: extinction niche parameters

  • alpha: Active dispersal ability

  • beta: Passive dispersal ability

  • r_use: Resource use rate per niche axis

  • r_trans: Resource-to-niche transformation function

Additionally, the following attributes:

  • niche_max: the maximum possible value of the fundamental niche

Examples

NULL

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