sum {kazaam} | R Documentation |
Sums the elements of a shaq.
## S4 method for signature 'shaq' sum(x, ..., na.rm = FALSE)
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? |
TODO
A single value.
Communication consists of a an allreduce on a single value.
## Not run: library(kazaam) x = ranshaq(runif, 10, 3) sum(x) sum(x, 1) finalize() ## End(Not run)