Skip to contents

Divides every element of A by the sum of all its elements – TDA's mscal1, matching A / sum(A).

Usage

tda_mscal1(A, dir = tempfile("tda"))

Arguments

A

a numeric matrix whose elements do not sum to zero.

dir

working directory.

Value

A numeric matrix.

Examples

A <- matrix(c(1, 2, 3, 4), 2)
tda_mscal1(A)   # A / sum(A): the cells now sum to one
#>      [,1] [,2]
#> [1,]  0.1  0.3
#> [2,]  0.2  0.4