permn_cols | R Documentation |
All permutations of the columns of a matrix
permn_cols(m)
m |
a matrix |
This function is a wrapper for permn
from package ‘combinat’.
a list with one element for each permutation of the columns. Each element of the list is an unnamed list with two components:
the permutation, a vector of positive integers,
a matrix obtained by permuting the columns of m
.
Georgi N. Boshnakov
m <- matrix(c(11:14,21:24,31:34), ncol=3)
pm <- permn_cols(m)
pm[[2]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.