% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{sliceScale_cpp}
\alias{sliceScale_cpp}
\alias{sliceScalePointer_cpp}
\title{Apply / by slice}
\usage{
sliceScale_cpp(X, M)

sliceScalePointer_cpp(X, M)
}
\arguments{
\item{X}{An array.}

\item{M}{A matrix with the same number of row and columns as X.}
}
\value{
An array of same size as X.
}
\description{
Fast computation of sweep(X, MARGIN = 1:2, FUN = "/", STATS = scale)
}
\examples{
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) 

}
\author{
Brice Ozenne <broz@sund.ku.dk>
}
