custnorm {virtualspecies}R Documentation

Normal function defined by extremes

Description

A modified version of the normal function based on three parameters:

See the example for an easier understanding.

Usage

custnorm(x, mean, diff, prob)

Arguments

x

a numeric value or vector. The input environmental variable.

mean

a numeric value or vector. The optimum (mean) of the normal curve

diff

a numeric value or vector. The absolute difference between the mean and extremes.

prob

a numeric value or vector. The percentage of the area under the curve between the chosen extreme values

Value

a numeric value or vector resulting from the function

Author(s)

Boris Leroy leroy.boris@gmail.com, Florian David

Maintainer: Boris Leroy leroy.boris@gmail.com

Examples

# Let's define the response of a species to temperature which
#  - has an optimum at 20 degrees C
#  - occurs 99% of the time between 13 and 27 degrees C.
# In that case, mean = 20, diff = 7, and prob = 0.99

# First, we generate an arbitrary temperature variable 
# between 0 and 30 degrees C
temp <- seq(0, 30, length = 1000)


# Then, we calculate the response to this variable with the chosen values
response <- custnorm(x = temp, mean = 20, diff = 7, prob = .99)

plot(response ~ temp, type = "l")

[Package virtualspecies version 1.6 Index]