data_generation: Data simulation of colonization-extinction dynamics

Description Usage Arguments Details Value See Also Examples

View source: R/DataSimulation.R

Description

data_generation simulates species richness data according to the stochastic model of island biogeography
PA_simulation simulates presence-absence data according to the stochastic model of island biogeography

Usage

1
2
3
data_generation(x, column, transitions, iter, times)

PA_simulation(x, column, transitions, times)

Arguments

x

A dataframe with the vector of initial absences and presences.

column

A number indicating the column with the initial presence-absence data.

transitions

A vector with the transition probabilities of the simulation, in the form (T01, T10).

iter

Number of times that the specified dynamics should be repeated.

times

Number of temporal steps to simulate.

Details

To simulate community assembly, we need an initial vector of presence-absence, from which the subsequent assembly process will be simulated. This initial vector is considered as x[, column].

Value

A matrix with species richness representing each row consecutive samples and each column a replica of the specified dynamics or a matrix with presence-absence data for the specified dynamics, each row representing a species and each column consecutive samplings.

See Also

cetotrans to obtain the transition probabilities asociated with a colonization-extinction pair.

Examples

1
2
3
4
data_generation(as.data.frame(rep(0, 100)), 1, c(0.5, 0.5), 5, 25)
data_generation(alonso[[1]], 3, c(0.5, 0.5), 5, 25)
PA_simulation(as.data.frame(c(rep(0, 163), rep(1, 57))), 1, c(0.13, 0.19),
20)

island documentation built on May 19, 2017, 10:26 p.m.

Search within the island package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.