Skip to contents

Turns the output of simulate_evolving_metacommunity() into an mc_sim object, as from simulate_metacommunity(), with the extant species, their reconstructed tree and their traits (the mean genetic optimum over their populations), for as_mc_data(), summary_stats() and the other functions of the package.

Usage

as_metacommunity(x, ...)

Arguments

x

An mc_evolving object.

...

Unused.

Value

An mc_sim object.

Examples

set.seed(1)
ls <- landscape_grid(5, disp_scale = 0.5)
ancestor <- data.frame(optimum = 50, sigma = 20, r_max = 5, row.names = "sp1")
sim <- simulate_evolving_metacommunity(ls, ancestor, dispersal = 0.002, n_steps = 300,
                                       speciation = speciation_control("geographic", 80))
as_metacommunity(sim)
#> <mc_sim> 25 sites x 86 species
#> species persisting: 86 of 86 
#> mean local richness: 6.4