Learn R Programming

madness (version 0.1.0)

colsums: Form Row and Column Sums and Means

Description

Form Row and Column Sums and Means for madness objects.

Usage

colSums(x, na.rm = FALSE, dims = 1, ...)

## S3 method for class 'madness': colSums(x, na.rm = FALSE, dims = 1)

colMeans(x, na.rm = FALSE, dims = 1, ...)

## S3 method for class 'madness': colMeans(x, na.rm = FALSE, dims = 1)

rowSums(x, na.rm = FALSE, dims = 1, ...)

## S3 method for class 'madness': rowSums(x, na.rm = FALSE, dims = 1)

rowMeans(x, na.rm = FALSE, dims = 1, ...)

## S3 method for class 'madness': rowMeans(x, na.rm = FALSE, dims = 1)

Arguments

x
madness object.
na.rm
logical. Should missing values (including NaN) be omitted from the calculations?
dims
integer: Which dimensions are regarded as rows or columns to sum over. For row*, the sum or mean is over dimensions dims+1, ...; for col* it is over dimensions 1:d
...
potentially further arguments, for method <-> generic compatibility.

Value

  • a madness object. Note that the sums are flattened to a column vector.