Skip to contents

Rescale each column of a matrix

Usage

rescaler(x, magnitude)

Arguments

x

a matrix

magnitude

a single value or a vector with length equal to the number of columns in x

Value

a matrix

Examples

rescaler(matrix(1, nrow = 2, ncol = 2), magnitude = c(2,3))
#>      [,1] [,2]
#> [1,]    2    3
#> [2,]    2    3