ReducedMatrix: Matrix reduction

Description Usage Arguments Value Author(s) Examples

View source: R/ReducedMatrix.R

Description

Reduce a matrix by removing alternatively columns and rows that sum to 0. If the matrix is dense or if every columns sum to more than 0, then nothing is changed.

Usage

1

Arguments

B

a matrix that contains lot of 0s.

Value

Returns a list including:

BB the reduced matrix of B.

ind_col a vector that contains the index of the remaining columns of B in BB.

ind_row a vector that contains the index of the remaining rows of B in BB.

Author(s)

Raphael Jauslin raphael.jauslin@unine.ch

Examples

1
2
3
set.seed(1)
B  <- matrix(sample(c(0,0,0,1),80,replace=TRUE), nrow = 8, ncol =  10)
ReducedMatrix(B)

SpotSampling documentation built on Oct. 26, 2020, 5:08 p.m.