plot_comm: Regional vs. Local trait distributions of abundances

Description Usage Arguments Details Value Author(s) Examples

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

1
plot_comm(x, type = "trait", seltrait = 1, main = NULL)

Arguments

x

a list including the species pool composition (x$pool) and the local community composition (x$com). For example, x may be the output of coalesc() or forward() functions.

type
  • if type = "trait", the function displays density plots of trait distributions.

  • if type = "abund", it displays the relationship between local and regional abundances.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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")

ecolottery documentation built on May 2, 2019, 9:34 a.m.