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/diffexpR documentation built on June 5, 2023, 10:18 p.m.