% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{rowMultiply_cpp}
\alias{rowMultiply_cpp}
\title{Apply * by row}
\usage{
rowMultiply_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)
rowMultiply_cpp(x, 1:5 )

rowMultiply_cpp(x, 1/colMeans(x) )

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