The by-row normalisation is the same as SingleR:::.trim_byLabel_and_normalize_scores.

normPhiScores(X, method = c("col", "row"))

Arguments

X

Matrix.

method

Character.

Value

A matrix normalised by row or by column.

Examples

set.seed(1)
scores <- matrix(rnorm(20), 5, 4, dimnames = list(NULL, LETTERS[1:4]))
normPhiScores(scores)
normPhiScores(scores, method = "row")