Skip to contents

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

Usage

bounded_niche(g_min, g_max)

Arguments

g_min

lowest value of the gradient the taxon can tolerate

g_max

highest value of the gradient the taxon can tolerate

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

See also

snd_niche() for an alternative niche model, apply_niche() for the function that uses the function returned

Examples


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