sampleSorted: Function to sample after sorting:

sampleSortedR Documentation

Function to sample after sorting:

Description

Function to sample after sorting:

Usage

sampleSorted(x, size, seed, replace = TRUE, sorted = TRUE, index.out = FALSE)

Arguments

x

The vector to sample from.

size

The length of the sampled vector.

seed

The seed to use for the sampling.

replace

Logical: If TRUE sample with replacement.

sorted

Sort the vector before sampling.

index.out

Return indices at which to sample rather than the actual samples.


StoXProject/RstoxBase documentation built on Nov. 6, 2024, noon