Learn R Programming

BAT (version 1.1)

sim.sample: Simulated sampling from artificial communities.

Description

Simulates a sampling process from artificial communities.

Usage

sim.sample(comm, cells = 100, samples = 0)

Arguments

comm
simulated community data from function sim.spatial.
cells
number of cells to divide the simulated space into. Default is 100.
samples
number of samples (cells) to randomly extract. Default is the number of cells (the entire community).

Value

  • A matrix of samples x species (values are abundance per species per sample).

Details

The space will be divided in both dimensions by sqrt(cells).

Examples

Run this code
comm <- sim.spatial(1000, 10)
sim.sample(comm)
sim.sample(comm, cells = 10, samples = 5)

Run the code above in your browser using DataLab