permutations {waddR}R Documentation

Return permutations of a given vector as columns in a matrix

Description

Returns permutations of a given vector as columns in a matrix

Usage

permutations(x, num_permutations)

Arguments

x

vector that is to be permutated

num_permutations

number of permutations to be performed

Value

a matrix, where each of the num_permutations columns represents one permutation of the input vector

Examples

x <- 1:10
set.seed(24)
permutations(x, 5)


[Package waddR version 1.6.1 Index]