MyNixOS website logo
Description

Spatial Simulation and Scale-Dependent Analysis of Biodiversity Changes.

Simulation, analysis and sampling of spatial biodiversity data (May, Gerstner, McGlinn, Xiao & Chase 2017) <doi:10.1111/2041-210x.12986>. In the simulation tools user define the numbers of species and individuals, the species abundance distribution and species aggregation. Functions for analysis include species rarefaction and accumulation curves, species-area relationships and the distance decay of similarity.

CRAN_Status_Badge

Licence

Project Status: Active – The project has reached a stable, usablestate and is being activelydeveloped.

DOI

R-CMD-check

Overview

The goal of the package mobsim is to facilitate understanding of scale-dependent biodiversity changes.

The package includes functions to simulate species distributions in space with controlled abundance distributions as well as controlled intraspecific aggregation. For analysis there are functions for species rarefaction and accumulation curves, species-area relationships, endemics-area relationships and the distance-decay of community similarity.

A detailed introduction of the package is available at bioRxiv.

Installation

# The easiest way to get mobsim is to install from CRAN:
install.packages("mobsim")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("MoBiodiv/mobsim", build_vignettes = TRUE)

Please enter bug reports on github.

Getting help

You can get an overview of the available functions in mobsim:

?mobsim

Or have a look at tutorials in the vignette:

browseVignettes("mobsim")

Examples

Here is an example of how to simulate two communities, which just differ in their spatial aggregation of species, but have the same species abundance distribution and the same total number of individuals.

Simulation of communities

library(mobsim)
comm_rand <- sim_poisson_community(s_pool = 30, n_sim = 300)
comm_agg <- sim_thomas_community(s_pool = 30, n_sim = 300, sigma = 0.05, mother_points = 1)
par(mfrow = c(1,2))
plot(comm_rand)
plot(comm_agg)

Analysis of spatially-explicit community data

mobsim mobsim offer functions to analyse spatially-explicit community data. For example the species-area relationship of a community can be easily evaluated.

sar_rand <- divar(comm_rand)
sar_agg <- divar(comm_agg)
plot(m_species ~ prop_area, data = sar_rand, type = "b", log = "xy",
     xlab = "Proportion of area sampled",ylab = "No. of species",
     ylim = c(3,30))
lines(m_species ~ prop_area, data = sar_agg, type = "b", col = 2)
legend("bottomright", c("Random","Aggregated"), col = 1:2, lwd = 2)

Sampling of communities

Simulated or observed communities can be also sampled inorder to test whether biodiversity changes are correctly detected and revealed by any sampling design.

par(mfrow = c(1,2))
samples_rand <- sample_quadrats(comm_rand, avoid_overlap = TRUE)
samples_agg <- sample_quadrats(comm_agg, avoid_overlap = TRUE)

Metadata

Version

0.3.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows