permutations: Return permutations of a given vector as columns in a matrix

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Returns permutations of a given vector as columns in a matrix

Usage

1
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

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

goncalves-lab/waddR documentation built on Oct. 28, 2021, 5:50 a.m.