Description Usage Arguments Details Value See Also Examples
Calculates the median absolute deviation for each row (column) of a matrix-like object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | rowMads(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826,
na.rm = FALSE, ...)
## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric'
rowMads(x, rows = NULL,
cols = NULL, center = NULL, constant = 1.4826, na.rm = FALSE,
dim. = dim(x), ...)
## S4 method for signature 'ANY'
rowMads(x, rows = NULL, cols = NULL, center = NULL,
constant = 1.4826, na.rm = FALSE, ...)
colMads(x, rows = NULL, cols = NULL, center = NULL, constant = 1.4826,
na.rm = FALSE, ...)
## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric'
colMads(x, rows = NULL,
cols = NULL, center = NULL, constant = 1.4826, na.rm = FALSE,
dim. = dim(x), ...)
## S4 method for signature 'ANY'
colMads(x, rows = NULL, cols = NULL, center = NULL,
constant = 1.4826, na.rm = FALSE, ...)
|
x |
An NxK matrix-like object. |
rows, cols |
A |
center |
(optional) the center, defaults to the row means |
constant |
A scale factor. See |
na.rm |
If |
... |
Additional arguments passed to specific methods. |
dim. |
An |
The S4 methods for x
of type matrix
,
array
, or numeric
call
matrixStats::rowMads
/ matrixStats::colMads
.
Returns a numeric
vector
of length N (K).
matrixStats::rowMads()
and
matrixStats::colMads()
which are used
when the input is a matrix
or numeric
vector.
For mean estimates, see rowMeans2()
and
rowMeans()
.
For non-robust standard deviation estimates, see
rowSds()
.
1 2 3 4 5 6 7 8 9 10 |
Loading required package: matrixStats
Attaching package: ‘MatrixGenerics’
The following objects are masked from ‘package:matrixStats’:
colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
colWeightedMeans, colWeightedMedians, colWeightedSds,
colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
rowWeightedSds, rowWeightedVars
[,1] [,2] [,3]
[1,] -0.1246820 0.1694560 0.9112676
[2,] NA 0.2120030 -1.4233170
[3,] 1.6103857 0.7653808 Inf
[4,] 0.0000000 0.3398396 -0.6489005
[5,] -0.4191414 0.9765461 1.7034618
[1] 0.4360891 NA 1.2528042 0.5038462 1.0777252
[1] NA 0.2526107 2.3131052
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.