colScale_cpp: Apply / by column

View source: R/RcppExports.R

colScale_cppR Documentation

Apply / by column

Description

Fast computation of sweep(X, MARGIN = 1, FUN = "/", STATS = scale)

Usage

colScale_cpp(X, scale)

Arguments

X

A matrix.

scale

a numeric vector of length equal to the number of rows of x

Value

A matrix of same size as X.

Author(s)

Brice Ozenne <broz@sund.ku.dk>

Examples

x <- matrix(1,6,5)
sweep(x, MARGIN = 1, FUN = "/", STATS = 1:6)
colScale_cpp(x, 1:6 )

riskRegression documentation built on Sept. 8, 2023, 6:12 p.m.