R: Standard deviation estimates for each row (column) in a...

rowMads {matrixStats} | R Documentation

## Standard deviation estimates for each row (column) in a matrix

### Description

Standard deviation estimates for each row (column) in a matrix.

### Usage

    rowMads(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826,
      na.rm = FALSE, dim. = dim(x), ...)

    colMads(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826,
      na.rm = FALSE, dim. = dim(x), ...)

    rowSds(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL,
      dim. = dim(x), ...)

    colSds(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL,
      dim. = dim(x), ...)

### Arguments

`x` | A `numeric` NxK `matrix`.
`rows, cols` | A `vector` indicating subset of rows (and/or columns) to operate over. If `NULL`, no subsetting is done.
`center` | (optional) The center, defaults to the row means for the SD estimators and row medians for the MAD estimators.
`constant` | A scale factor. See `mad` for details.
`na.rm` | If `TRUE`, `NA`s are excluded first, otherwise not.
`dim.` | An `integer` `vector` of length two specifying the dimension of `x`, also when not a `matrix`.
`...` | Additional arguments passed to `rowMeans()` and `rowSums()`.

### Value

Returns a `numeric` `vector` of length N (K).

### Author(s)

Henrik Bengtsson

### See Also

`sd`, `mad` and `var`. `rowIQRs`().

[Package matrixStats version 0.57.0 Index]