sum_prod: Multiply a list of vectors element-wise and and sum the...

View source: R/utils.R

sum_prodR Documentation

Multiply a list of vectors element-wise and and sum the result

Description

Useful function inside a summarize() to multiply columns together especially if some are booleans. This way we can summarize in a single command with different "pseudo-filters"

Usage

sum_prod(..., na.rm = TRUE)

Arguments

...

a list of vectors

na.rm

Remove NA during the summation. Default to TRUE

Value

a single value


JMPivette/evavelo documentation built on April 8, 2023, 4:20 p.m.