Learn R Programming

NSM3 (version 1.1)

multCh7: Possible arrangements by row for a matrix

Description

Similar to multComb, this function will generate all of the possible arrangements of the data by row within a matrix. For a given matrix of n rows and k columns, this will give (k!)^n possible arrangements

Usage

multCh7(our.matrix)

Arguments

Value

Returns an array, containing (k!)^n distinct matrices of the same size as our.matrix

Details

The computations involved get very time consuming very quickly, so be careful not to use it for too large of a matrix.

Examples

Run this code
some.matrix<-matrix(c(1,2,7,4,5,9),ncol=3,byrow=TRUE)
multCh7(some.matrix)

Run the code above in your browser using DataLab