View source: R/sp.env.functions.R
custnorm | R Documentation |
A modified version of the normal function based on three parameters:
the mean
the absolute difference between the mean and extreme values
the percentage of area under the curve between the specified extreme values
See the example for an easier understanding.
custnorm(x, mean, diff, prob)
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 |
a numeric value or vector resulting from the function
Boris Leroy leroy.boris@gmail.com, Florian David
Maintainer: Boris Leroy leroy.boris@gmail.com
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.