A simple analogue of R’s scale(A)
function (with the default arguments) would be:
using LinearAlgebra, Statistics
scale(A) = mapslices(normalize!, A .- mean(A,dims=1), dims=1)
A simple analogue of R’s scale(A)
function (with the default arguments) would be:
using LinearAlgebra, Statistics
scale(A) = mapslices(normalize!, A .- mean(A,dims=1), dims=1)