sample_by_species: Subsample a dataset by species

Description Usage Arguments Value Examples

View source: R/sample_by_species.R

Description

Sample a dataset as if we only recorded some species.

Usage

1
sample_by_species(dataset, count)

Arguments

dataset

A matrix, data frame or tibble containing abundance or incidence data

count

The number of species to retain

Value

The subsampled dataset in the format it was passed in

Examples

1
2
3
library(magrittr)
sample_by_species(bci_2010, count = 20) %>%
  sample_by_subcommunities(count = 6)

IBAHCM/BakariMtiliBCI documentation built on Feb. 16, 2021, 12:01 a.m.