fn interp_sample(
args: &[RValue],
named: &[(String, RValue)],
context: &BuiltinContext<'_>,
) -> Result<RValue, RError>Expand description
Random sampling with or without replacement.
@param x vector to sample from, or a positive integer n (sample from 1:n) @param size number of items to draw (default: length of x) @param replace if TRUE, sample with replacement (default FALSE) @param prob optional vector of probability weights @return vector of sampled elements