Mapping functions that map from a single item (or row) to a value. Typically used with mutate.
Returns a function that computes a rate (numerator / denominator), setting the value to 0 if denominator = 0 and numerator = 0. If denominator or numerator are nully, the result is undefined.
Either a key of the object or an accessor function that returns a number given the object. This will be used as the numerator when computing the rate.
Either a key of the object or an accessor function that returns a number given the object. This will be used as the denominator when computing the rate.
allowDivideByZero = false: If true, evaluates division when denominator is 0 (typically resulting in Infinity), otherwise rates with 0 denominators are
predicate: Optional parameter that when provided will return undefined as the value of the rate when the predicate function returns false. This is typically used for only computing rates when there is sufficient sample size (i.e., checking if the denominator is large enough). For example: