sum {kazaam}R Documentation

sum

Description

Sums the elements of a shaq.

Usage

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

Arguments

x

A shaq.

...

Additionaly elements (shaqs or numeric vectors/matrices) to sum. Regular vectors/matrices are assumed to be global, but will only be included to the sum on rank 0.

na.rm

should NA's be removed?

Details

TODO

Value

A single value.

Communication

Communication consists of a an allreduce on a single value.

Examples

## Not run: 
library(kazaam)
x = ranshaq(runif, 10, 3)

sum(x)
sum(x, 1)

finalize()

## End(Not run)


[Package kazaam version 0.2-0 Index]