lof: A function to left order a matrix based on first occurrence...

Description Usage Arguments Value Examples

View source: R/lof.R

Description

Given a binary matrix Z with fixed rows, 'lof' left orders the matrix sequentially based on first occurrence of each row

Usage

1
lof(Z, indices = FALSE)

Arguments

Z

a binary matrix

indices

a logical parameter whether to return the column order ('TRUE') or to return the left-ordered matrix. Defautl is 'TRUE'.

Value

return the left-ordered matrix, or a vector of indexing the order of columns

Examples

1
2
Z <- matrix(rbinom(10*30, 1, 0.1), nrow=10, ncol=30)
Zord = lof(Z)

melmasri/HPprediction documentation built on May 2, 2020, 11:09 a.m.