normalise: Normalise a matrix by rows or column

Description Usage Arguments Functions

View source: R/normalise.R

Description

Normalise rows or columns of a matrix for the L1 or L2 norm.

Usage

1
2
3
normalise(mat, norm = 1, by = "col")

normalize(mat, norm = 1, by = "col")

Arguments

mat

Matrix to normalise

norm

1 (for L1 norm) or 2 (for L2 norm)

by

"col" or "row"

Functions


antoine-sachet/customFunctions documentation built on Sept. 25, 2020, 8:56 p.m.