Learn R Programming

matrixStats (version 0.1.5)

rowProds: Calculates the product for each row (column) in a matrix

Description

Calculates the product for each row (column) in a matrix.

Usage

rowProds(x, ...)
 colProds(x, ...)

Arguments

x
...
Arguments passed to rowSums().

Value

Details

Internally the product is calculated via the logarithmic transform, treating zeros and negative values specially.