plot_comm {ecolottery} | R Documentation |
Regional vs. Local trait distributions of abundances
Description
Graphical function to used on the output of coalesc()
or
forward()
functions.It aims at plotting links between regional and
local trait/abundance distributions.
Usage
plot_comm(x, type = "trait", seltrait = 1, main = NULL)
Arguments
x |
a list including the species pool composition ( |
type |
|
seltrait |
index of the trait to be plotted following community data.frame (if multiple traits used in simulation). |
main |
an overall title for the plot. |
Details
If type = "trait"
, the function provides density plots of the trait or
abundance distributions in the regional pool and in a local community.
If type = "abund"
, the function displays the relationship between
regional and local species relative abundances.
By default type = "trait"
.
To be used on the output of coalesc()
or forward()
functions.
Value
Return two stacked ggplot2
density plots if
type = "trait"
and a biplot if type = "abund"
.
Author(s)
F. Munoz; P. Denelle
Examples
# Simulation of a neutral community including 100 individuals
J <- 500; theta <- 50; m <- 0.1;
comm1 <- coalesc(J, m, theta)
plot_comm(comm1)
plot_comm(comm1, type = "abund")
# Stabilizing habitat filtering around t = 0.5
comm2 <- coalesc(J, m, theta, filt = function(x) 0.5 - abs(0.5 - x))
plot_comm(comm2)
plot_comm(comm2, type = "abund")