Skip to contents

Takes a permutation sample. See the Details section below for further information.

Usage

permutationSample(N)

Arguments

N

positive integer value, the population size

Value

A vector of length n containing the index of the computed random set of observations.

Details

This function is a wrapper to the sample.int function.

Author

Alessandro Barberis

Examples

#Set seed for reproducibility
set.seed(seed = 5381L)

#Random sequence of N elements from 1 to N
permutationSample(N = 10)
#>  [1]  1  9  7  2  4  3  6 10  5  8