weightsByBin: Compute sampling weights for continues values by binning.

Description Usage Arguments Value See Also

View source: R/randomization.R

Description

Compute sampling weights to sample from a population with osberved probabilities by binning.

Usage

1
weightsByBin(obs, population, breaks = 50)

Arguments

obs

vector of observed values according to which the sampling should be done (e.g distances observed for paralog gene pairs).

population

vector of all values in the total population from which one wants to sample (e.g distances of all gene pairs)

breaks

breaks used for sampling resolution (see breaks argument in hist function).

Value

numeric vector with sampling weights to sample from population with probabilities observed in obs.

See Also

weightsByFactorFreq


ibn-salem/genepair documentation built on Aug. 7, 2017, 9:47 a.m.