Learn R Programming

Seurat (version 3.1.4)

RowMergeSparseMatrices: Merge two matrices by rowname

Description

This function is for use on sparse matrices and should not be run on a Seurat object.

Usage

RowMergeSparseMatrices(mat1, mat2)

Arguments

mat1

First matrix

mat2

Second matrix

Value

A merged matrix

Returns a sparse matrix

Details

Shared matrix rows (with the same row name) will be merged, and unshared rows (with different names) will be filled with zeros in the matrix not containing the row.