permutations: permutations

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

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

Usage

1
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

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

waddR documentation built on Nov. 8, 2020, 8:32 p.m.