rowMultiply_cpp: Apply * by row

View source: R/RcppExports.R

rowMultiply_cppR Documentation

Apply * by row

Description

Fast computation of sweep(X, MARGIN = 2, FUN = "*", STATS = scale)

Usage

rowMultiply_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 = 2, FUN = "*", STATS = 1:5)
rowMultiply_cpp(x, 1:5 )

rowMultiply_cpp(x, 1/colMeans(x) )


riskRegression documentation built on March 23, 2022, 5:07 p.m.