sample_by_individuals: Subsample a dataset by individuals

Description Usage Arguments Value Examples

Description

Subsample a dataset so we only count some of the individuals - either sampling until a fixed limit is met, or sampling a fraction of total, simulating a fractional sampling effort or over a fraction of the area of each subcommunity.

Usage

1
sample_by_individuals(dataset, count, fraction)

Arguments

dataset

A data frame containing abundance or incidence data

count

The number of individuals to retain (or fewer if fewer present)

fraction

The fraction of individuals in each subcommunity to retain

Value

The subsampled dataset as a tibble

Examples

1
2
3
4
5
6
7
library(iNEXT)
data(bird)
sample_by_individuals(bird, count = 100)

data(ciliates)
eto.incidence <- ciliates$EtoshaPan
sample_by_individuals(eto.incidence, fraction = 0.1)

boydorr/sampling documentation built on May 23, 2019, 1:45 p.m.