sliceScale_cpp: Apply / by slice

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

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

Usage

1
2
3

Arguments

X

An array.

M

A matrix with the same number of row and columns as X.

Value

An array of same size as X.

Author(s)

Brice Ozenne <broz@sund.ku.dk>

Examples

1
2
3
4
x <- array(1, dim = c(2,6,5))
M <- matrix(1:12,2,6)
sweep(x, MARGIN = 1:2, FUN = "/", STATS = M)
sliceScale_cpp(x, M) 

riskRegression documentation built on Jan. 13, 2021, 11:12 a.m.