refdb_sample_tax: Sample records within taxa

View source: R/refdb_sample.R

refdb_sample_taxR Documentation

Sample records within taxa

Description

This function can be useful to keep a maximum of records per taxa. This function require dplyr dev version to work because of slice_sample. Will be exported once available.

Usage

refdb_sample_tax(x, n_max = 10, cols = NULL)

Arguments

x

a reference database.

n_max

maximum number of records to keep for each taxa.

cols

an optional vector of column names. If NULL (default), the function is applied to the columns associated with the taxonomy field.

Value

A reference database.


refdb documentation built on Sept. 22, 2022, 5:07 p.m.