Skip to contents

Normalise the rows or columns of a matrix using L2 norm

Usage

NormaliseL2(mat, MARGIN = 1)

Arguments

mat

a matrix (sparse or dense)

MARGIN

one of 1 or 2, corresponding to normalisation per rows and columns respectively

Value

the matrix with normalised rows or columns

Note

Adapted from Seurat:::L2Norm