sumR Documentation

Sum of Vector Elements

Description

sum returns the sum of all the values in its arguments. fm.sum returns the sum of all the values in the input object. It can evaluate the summation lazily.

Usage

fm.sum(x, lazy = FALSE)

## S4 method for signature 'fm'
sum(x, ..., na.rm = FALSE)

## S4 method for signature 'fmV'
sum(x, ..., na.rm = FALSE)

Arguments

x

a FlashR vector or matrix.

lazy

indicates whether or not to evaluate it lazily.

...

zero or more vectors or matrices.

na.rm

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

Value

The sum.

Examples

mat <- fm.runif.matrix(100, 10)
sum(mat)
fm.sum(mat)