pool: Pooling

View source: R/utils.R

poolR Documentation

Pooling

Description

This function randomly assigns samples to pools of approximately equal area

Usage

pool(sample_id = 1:length(area), area, target_area, max_try = 100L)

.pool(sample_id = 1:length(area), area, target_area, max_try = 100L)

Arguments

sample_id

sample identifier

area

sampling area of sample_id (in the same units as target_area)

target_area

vector of length 2 containing the lower and upper bound of the pooled area (same units as area)

max_try

maximum number of unsuccessful pooling tries before the algorithm gives up.

Value

vector with idenitifiers (integers) indicating the pool to which each sample belongs (NA for samples that could not be pooled)

Functions

  • .pool(): internal function not supposed to be called directly.


benthos documentation built on Aug. 22, 2022, 5:07 p.m.