Description Usage Arguments Details Value Examples

Arithmetic reductions for distributed matrices.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ```
rowMin(x, ...)
rowMax(x, ...)
colMin(x, ...)
colMax(x, ...)
## S4 method for signature 'ddmatrix'
rowSums(x, na.rm = FALSE)
## S4 method for signature 'ddmatrix'
colSums(x, na.rm = FALSE)
## S4 method for signature 'ddmatrix'
rowMeans(x, na.rm = FALSE)
## S4 method for signature 'ddmatrix'
colMeans(x, na.rm = FALSE)
## S4 method for signature 'ddmatrix'
rowMin(x, na.rm = FALSE)
## S4 method for signature 'matrix'
rowMin(x, na.rm = FALSE)
## S4 method for signature 'ddmatrix'
colMin(x, na.rm = FALSE)
## S4 method for signature 'matrix'
colMin(x, na.rm = FALSE)
## S4 method for signature 'ddmatrix'
rowMax(x, na.rm = FALSE)
## S4 method for signature 'matrix'
rowMax(x, na.rm = FALSE)
## S4 method for signature 'ddmatrix'
colMax(x, na.rm = FALSE)
## S4 method for signature 'matrix'
colMin(x, na.rm = FALSE)
``` |

`x` |
numeric distributed matrix |

`...` |
additional arguments |

`na.rm` |
logical. Should missing (including |

Performs the reduction operation on a distributed matrix.

There are several legitimately new operations, including `rowMin()`

,
`rowMax()`

, `colMin()`

, and `colMax()`

. These
implementations are not really necessary in R because one can easily (and
reasonably efficiently) do something like

`apply(X=x, MARGIN=1L, FUN=min, na.rm=TRUE)`

But `apply()`

on a `ddmatrix`

is *very* costly, and should be
used sparingly.

`sd()`

will compute the standard deviations of the columns, equivalent
to calling `apply(x, MARGIN=2, FUN=sd)`

(which will work for
distributed matrices, by the way). However, this should be much faster and
use less memory than `apply()`

. If `reduce=FALSE`

then the return
is a distributed matrix consisting of one (global) row; otherwise, an
`R`

vector is returned, with ownership of this vector determined by
`proc.dest`

.

Returns a global numeric vector.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.