sample_replace: Sample considering reference values

View source: R/000_common.R

sample_replaceR Documentation

Sample considering reference values

Description

Similar to standard sample function. The values in ref can be chosen or not, according to original.

Usage

sample_replace(x, size, original, ref)

Arguments

x

a vector with the alternatives to choose.

size

an integer with the number of elements to select from x.

original

a boolean indicating if the values in ref can be chosen.

ref

a vector with n reference values.

Value

A vector with the elements chosen from x.


noisemodel documentation built on Oct. 17, 2022, 9:05 a.m.