ColNNZ: Count non-zero entries per column of a matrix

ColNNZR Documentation

Count non-zero entries per column of a matrix

Description

Count non-zero entries per column of a matrix

Usage

ColNNZ(x)

## S4 method for signature 'matrix'
ColNNZ(x)

## S4 method for signature 'dgCMatrix'
ColNNZ(x)

## S4 method for signature 'dgRMatrix'
ColNNZ(x)

## S4 method for signature 'dgTMatrix'
ColNNZ(x)

Arguments

x

A matrix, hopefully sparse.

Value

An integer vector of length ncol(x) with the number of non-zero entries in each column of the matrix.

Methods (by class)

  • matrix: x of class "matrix"

  • dgCMatrix: x of class "dgCMatrix"

  • dgRMatrix: x of class "dgRMatrix"

  • dgTMatrix: x of class "dgTMatrix"

References

https://stackoverflow.com/questions/51560456/r-package-matrix-get-number-of-non-zero-entries-per-rows-columns-of-a-sparse


BaderLab/scClustViz documentation built on Sept. 10, 2023, 11:51 p.m.