drop.all.zeros: Drop rows and/or columns with all zeros

Description Usage Arguments Examples

View source: R/tools.R

Description

This function allows you to drop rows and/or columns with all zeros.

Usage

1
drop.all.zeros(mtx, rows = TRUE, columns = TRUE, square.matrix = "none")

Arguments

mtx

Matrix or dataframe.

rows

Drop rows with all zeros.

columns

Drop columns with all zeros.

square.matrix

Special mode for square matrices ('any' or 'all'). any: if the column or row is full of zeros, delete both; all: if the column or row is not full of zeros, keep both

Examples

1
2
3
mtx <- drop.all.zeros(mtx)
mtx <- drop.all.zeros(mtx, square.matrix='any')
mtx <- drop.all.zeros(mtx, square.matrix='all')

rlebron-bioinfo/gnlearn documentation built on July 25, 2020, 12:38 p.m.