sample_vector: Wrapper function to sample from a vector without any...

Description Usage Arguments Details Value

Description

This function is a wrapper for the base sample function that circumvents the _undesired behavior_ from the _convenience feature_ discussed in the function's documentation.

Usage

1

Arguments

x

vector

...

additional arguments passed to sample

Details

For example, if x contains a single element, say, 42, we wish sample(42) to return only 42 rather than a random permutation of 1:42.

Value

a vector containing a random permutation of x


ramhiser/clusteval documentation built on May 26, 2019, 10:07 p.m.