nonzero: find nonzero entries in a sparse (dgcMatrix) matrix

Description Usage Arguments Details Value

View source: R/nonzero.R

Description

find nonzero entries in a sparse (dgcMatrix) matrix

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

Arguments

x

the matrix

Details

nz is borrowed from the DAPAR package and is the base function. nz_rownames returns the rownames for nonzero rows of x. nz_rows just wraps unique(x@i) for a dgCMatrix x. nz_colnames returns the colnames for nonzero columns of x. nz_cols finds nonzero columns of a dgCMatrix x. nonzero retains additional information about x alongside nz. These are handy for (e.g.) computing TPMs and the like in 3'/5' data.

Value

1
 for `nonzero`, a list with elements "nz", "nrow", and "ncol"

trichelab/velocessor documentation built on Jan. 5, 2022, 6:27 p.m.