Drop-in replacements for rowMeans() and rowSums() that default to
na.rm = TRUE. Both return NA for rows where ALL values are missing
(base rowMeans() returns NaN, base rowSums() returns 0).
A numeric or complex array of suitable size, or a vector if the
result is one-dimensional.
Arguments
x
A numeric matrix or data frame.
na.rm
Logical. Should missing values be removed? Default TRUE.
all_na
Character. What to do when all values are NA:
"error" (default) throws an error, "base" returns what base R does
with na.rm = TRUE (NaN for rowMeans(), 0 for rowSums()),
"na" returns NA. If NULL, uses getOption("tidyna.all_na", "error").