Learn R Programming

StratPal (version 0.4.0)

bounded_niche: define niche from boundaries

Description

Defines a simple niche model where the niche defined is given by a lower limit (g_min) and an upper limit (g_max) of a gradient the taxon can tolerate

Usage

bounded_niche(g_min, g_max)

Value

a function describing the niche for usage with apply_niche. The function returns 1 if the taxon is within its niche (the gradient is between g_min and g_max), and 0 otherwise

Arguments

g_min

lowest value of the gradient the taxon can tolerate

g_max

highest value of the gradient the taxon can tolerate

See Also

  • snd_niche() for an alternative niche model

  • discrete_niche() for defining niches based on discrete categories

  • apply_niche() for the function that uses the function returned

  • vignette("advanced_functionality") for details how to create user-defined niche models

Examples

Run this code

x = seq(0, 10, by = 0.2)
f = bounded_niche(2,5)
plot(x, f(x), type = "l",
xlab = "Gradient", ylab = "Observation probability",
main = "Observation probability of taxon")

# see also
#vignette("event_data")
# for details how to use this functionality


Run the code above in your browser using DataLab