R/product.R, R/rowProds.R
rowProds.RdCalculates the product for each row (column) in a matrix.
A vector indicating subset of elements to
operate over. If NULL, no subsetting is done.
If TRUE, missing values are
excluded.
Not used.
A vector indicating subset of rows to
operate over. If NULL, no subsetting is done.
A vector indicating subset of columns to
operate over. If NULL, no subsetting is done.
A character string specifying how each
product is calculated.
If TRUE (default), names
attributes of the result are set, otherwise not.
If method = "expSumLog", then then product() function is
used, which calculates the product via the logarithmic transform (treating
negative values specially). This improves the precision and lowers the risk
for numeric overflow. If method = "direct", the direct product is
calculated via the prod() function.