helper_rowSums: Perform row sum

helper_rowSumsR 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 x and if na.rm is TRUE.

...

other arguments to pass to base::rowSums()

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)

lindsayevanslee/whomds documentation built on Sept. 9, 2023, 10:54 p.m.