Description Usage Arguments Details Value References See Also Examples
Calculates the n
-dimensional realised niche for a community
of s
species at m
coordinates in niche space.
1 | real.niche(niche.coords, community, interactions)
|
niche.coords |
A |
community |
List of length |
interactions |
A |
The first step in calculating the realised niches is to calculate a
fundamental niche for each species in the community
list. This is done
using the fund.niche
function, so see there for a full description
of how to define a the species fundamental niches.
The interactions
matrix defines the form of the ecological interaction
between each of the species in the community. These interactions can be either
positive (+) or negative (-) in effect, and as the interactions can be
asymmetrical there are a range of possible interspecific species interactions:
competition (–), predator-prey or parasite-host (+-), commensalism (+0),
amensalism (-0), or mutualism (++). When building the interactions matrix
row 1 column 2 is the effects of species 2 on species 1, and conversely row 2
column 1 is the effects of species 1 on species 2, etc.
Please note that this function assumes that the species are consistently ordered in the community list and interactions matrix, and that no species effects itself so the diagonal of the interactions matrix has values equal to zero.
Returns a m
-by-s
matrix realised niche value for each species at
each of the input niche space coordinates.
Etherington TR, Omondiagbe OP (2019) virtualNicheR: generating virtual fundamental and realised niches for use in virtual ecology experiments. Journal of Open Source Software 4:1661 https://doi.org/10.21105/joss.01661
Uses fund.niche
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # Define the community
species1 = list(2.5, matrix(c(25, 100)), matrix(data=c(9, 60,
60, 625), nrow=2, ncol=2, byrow=TRUE))
species2 = list(5.0, matrix(c(28, 110)), matrix(data=c(4, -20,
-20, 500), nrow=2, ncol=2, byrow=TRUE))
species3 = list(3.0, matrix(c(25, 80)), matrix(data=c(4, 0,
0, 150), nrow=2, ncol=2, byrow=TRUE))
community = list(species1, species2, species3)
# Define the interactions
interactions = matrix(data=c(0.0, 0.2,-0.4,
-1.0, 0.0,-1.0,
-0.6, 0.3, 0.0), nrow=3, ncol=3, byrow = TRUE)
# Calculate the realised niche values
niche.XY = niche.grid.coords(mins=c(15,0), maxs=c(35,200), nCoords=121)
realNiche = real.niche(niche.XY, community, interactions)
# Plot the realised niche for species 1
realNiche1 = matrix(realNiche[,1], nrow=length(unique(niche.XY[,1])))
nContour = 10
filled.contour(unique(niche.XY[,1]), unique(niche.XY[,2]), realNiche1,
levels = seq(0, 5, 5/nContour),
col=colorRampPalette(c("gold", "firebrick"))(nContour),
xlab=expression(paste("Temperature (", degree, "C)")),
ylab="Rainfall (mm)",
main ="Realised niche",
key.title = title(main = expression(lambda)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.