permutations {waddR}R Documentation

permutations

Description

Returns permutations of a given NumericVector as columns in a NumericMatrix object.

Usage

permutations(x, num_permutations)

Arguments

x

NumericVector representing a vector that is to be permutated

num_permutations

Integer representing the number of permutations that are to be performed.

Value

a matrix containing in every column one permutations of the input vector

Examples

x <- seq(1:10)
m <- permutations(x, 5)
dim(m)
#[1] 10  5


[Package waddR version 1.2.0 Index]