% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{rowScale_cpp}
\alias{rowScale_cpp}
\title{Apply / by row}
\usage{
rowScale_cpp(X, scale)
}
\arguments{
\item{X}{A matrix.}

\item{scale}{a numeric vector of length equal to the number of rows of \code{x}}
}
\value{
A matrix of same size as X.
}
\description{
Fast computation of sweep(X, MARGIN = 2, FUN = "/", STATS = scale)
}
\examples{
x <- matrix(1,6,5)
sweep(x, MARGIN = 2, FUN = "/", STATS = 1:5)
rowScale_cpp(x, 1:5 )

rowScale_cpp(x, colMeans(x) )
}
\author{
Brice Ozenne <broz@sund.ku.dk>
}
