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

View source: R/RcppExports.R

permutationsR 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)


goncalves-lab/waddR documentation built on June 29, 2023, 12:18 a.m.