rowProds {matrixStats} | R Documentation |
Calculates the product for each row (column) in a matrix.
rowProds(x, ...) colProds(x, ...)
x |
A numeric NxK matrix . |
... |
Arguments passed to rowSums (). |
Internally the product is calculated via the logarithmic transform, treating zeros and negative values specially.
Returns a numeric
vector
of length N (K).
Henrik Bengtsson (http://www.braju.com/R/)