Learn R Programming

BEQI2 (version 2.0-0)

pool: Pooling

Description

This function randomly assigns samples to pools of approximately equal area

Usage

pool(sampleId = 1:length(area), area, targetArea, maxTry = 100L)

Arguments

sampleId
identifier
area
sample corresponding to sampleId
targetArea
vector of length 2 containing the lower and upper bound of the pooled area
maxTry
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)