permn_cols: All permutations of the columns of a matrix

View source: R/mixARsim.R

permn_colsR Documentation

All permutations of the columns of a matrix

Description

All permutations of the columns of a matrix

Usage

permn_cols(m)

Arguments

m

a matrix

Details

This function is a wrapper for permn from package ‘combinat’.

Value

a list with one element for each permutation of the columns. Each element of the list is an unnamed list with two components:

  1. the permutation, a vector of positive integers,

  2. a matrix obtained by permuting the columns of m.

Author(s)

Georgi N. Boshnakov

Examples

m <- matrix(c(11:14,21:24,31:34), ncol=3)
pm <- permn_cols(m)
pm[[2]]

GeoBosh/mixAR documentation built on May 9, 2022, 7:36 a.m.