safe_sample: Safer implementation of base sample

Description Usage

View source: R/utils.R

Description

Wraps sample function in base R so that if options are length 1 and an integer, doesn't default to sample.int. See sample for arguments.

Usage

1
safe_sample(x, size, prob = NULL, replace = TRUE)

mrajeev08/simrabid documentation built on May 7, 2021, 11:47 a.m.