helper_rowSums {whomds} | R Documentation |
Perform row sum
Description
Perform row sum
Usage
helper_rowSums(x, allNA0 = TRUE, ...)
Arguments
x |
an array of two or more dimensions, containing numeric, complex, integer or logical values, or a numeric data frame |
allNA0 |
logical indicating that if a whole row is NA to give the row sum as NA. Only works for two dimensional |
... |
other arguments to pass to |
Details
Essentially equivalent to base::rowSums()
except with the addition of the allNA0
argument.
Value
A numeric or complex array of suitable size, or a vector if the result is one-dimensional.
Examples
x <- data.frame(v1 = c(NA,1:4), v2 = c(NA, 2:5), v3 = c(NA, 1:2, NA, 3))
helper_rowSums(x, na.rm = TRUE, allNA0 = TRUE)
helper_rowSums(x, na.rm = TRUE, allNA0 = FALSE)
[Package whomds version 1.1.1 Index]