Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SubsetMatrix

Subset matrix rows and columns


Description

Subset the rows and columns of a matrix by removing rows and columns with less than the specified number of non-zero elements.

Usage

SubsetMatrix(
  mat,
  min.rows = 1,
  min.cols = 1,
  max.row.val = 10,
  max.col.val = NULL
)

Arguments

mat

A matrix

min.rows

Minimum number of non-zero elements for the row to be retained

min.cols

Minimum number of non-zero elements for the column to be retained

max.row.val

Maximum allowed value in a row for the row to be retained. If NULL, don't set any limit.

max.col.val

Maximum allowed value in a column for the column to be retained. If NULL, don't set any limit.

Value

Returns a matrix

Examples

SubsetMatrix(mat = volcano)

Signac

Analysis of Single-Cell Chromatin Data

v1.2.1
MIT + file LICENSE
Authors
Tim Stuart [aut, cre] (<https://orcid.org/0000-0002-3044-0897>), Avi Srivastava [aut] (<https://orcid.org/0000-0001-9798-2079>), Paul Hoffman [ctb] (<https://orcid.org/0000-0002-7693-8957>), Rahul Satija [ctb] (<https://orcid.org/0000-0001-9448-8833>)
Initial release
2021-05-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.