multCh7SM: Possible arrangements by row a matrix, where NA values are...

Description Usage Arguments Details Value Author(s) Examples

View source: R/multCh7SM.R

Description

Similar to multCh7, this function will generate all of the possible arrangements of the data by row within a matrix, except for NA values, which will remain fixed. This function is used in pSkilMack and cSkilMack to generate the Exact distribution. For a given matrix of with k1,...kn non-missing values, this will give k1!*k2!*...*kn! possible arrangements

Usage

1
multCh7SM(our.matrix)

Arguments

our.matrix

The matrix containing the data (including NA values) which will be rearranged by row.

Details

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

Value

Returns an array, containing k1!*k2!*...*kn! distinct matrices of the same size as our.matrix

Author(s)

Grant Schneider

Examples

1
2
3
4
##Get a matrix with some NA's
our.matrix<-matrix(c(NA,1,2,3,5,7,NA,NA,11),ncol=3,byrow=TRUE)
##Get every possible arrangement by row, treating the NA's as fixed
multCh7SM(our.matrix)

NSM3 documentation built on April 6, 2021, 5:05 p.m.

Related to multCh7SM in NSM3...