Learn R Programming

madness (version 0.2.8)

sumprod: Sum and Product.

Description

Compute sum or product of madness objects.

Usage

# S4 method for madness
sum(x, ..., na.rm = FALSE)

# S4 method for madness prod(x, ..., na.rm = FALSE)

Value

a madness object representing a scalar value.

Arguments

x

a numeric or madness object.

...

ignored here.

na.rm

logical. Should missing values (including ‘NaN’) be removed?

Author

Steven E. Pav shabbychef@gmail.com

Examples

Run this code
xv <- matrix(rnorm(5*5),ncol=5)
xmad <- madness(xv)
prod(xv)
sum(xv)

Run the code above in your browser using DataLab