sample_quadrats: Plot-based samples from a spatially-explicit census

Description Usage Arguments Value Examples

View source: R/Sample_quadrats.R

Description

This function allows to sample quadratic subplots from a spatially-explicit community. The output format are a sites x species abundance table and a sites x xy-coordinates table. The sites x species abundance is a classical data format used in community ecology. The table generated can be for instance be further analysed with the package vegan.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
sample_quadrats(
  comm,
  n_quadrats = 20,
  quadrat_area = 0.01,
  plot = TRUE,
  method = "random",
  avoid_overlap = F,
  x0 = 0,
  y0 = 0,
  delta_x = 0.1,
  delta_y = 0.1
)

Arguments

comm

Community object from which the samples are generated

n_quadrats

Number of sampling quadrats

quadrat_area

Area of the sampling quadrats

plot

Should the sampling design be plotted? (logical)

method

Available methods are "random", "transect", "grid"

avoid_overlap

For the random sampling try to generate a design without overlap of quadrats (logical)

x0, y0

Lower left corner of the first quadrat in transect and grid sampling

delta_x

Distance between consecutive quadrats in transect and grid sampling in x-direction (the distance between the left sides is measured)

delta_y

Distance between consecutive quadrats in transect and grid sampling in y-direction (the distance between the lower sides is measured)

Value

A list with two items, spec_dat and xy_dat. spec_dat is a data.frame with sampling quadrats in rows and species abundances in columns, and xy_dat is a data.frame with sampling quadrats in rows and the xy-coordinates of the quadrats (lower left corner) in columns.

Examples

1
2
3
4
5
6
library(vegan)
sim_com1 <- sim_poisson_community(100, 10000)
comm_mat1 <- sample_quadrats(sim_com1, n_quadrats = 100,
quadrat_area = 0.002, method = "grid")
specnumber(comm_mat1$spec_dat)
diversity(comm_mat1$spec_dat, index = "shannon")

MoBiodiv/MoBspatial documentation built on July 24, 2021, 6:09 p.m.