Description Usage Arguments Details Value See Also Examples
Calculates the standard 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 | rowSds(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, ...)
## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric'
rowSds(x, rows = NULL,
cols = NULL, na.rm = FALSE, center = NULL, dim. = dim(x), ...)
## S4 method for signature 'ANY'
rowSds(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, ...)
colSds(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, ...)
## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric'
colSds(x, rows = NULL,
cols = NULL, na.rm = FALSE, center = NULL, dim. = dim(x), ...)
## S4 method for signature 'ANY'
colSds(x, rows = NULL, cols = NULL, na.rm = FALSE, center = NULL, ...)
|
x |
An NxK matrix-like object. |
rows, cols |
A |
na.rm |
If |
center |
(optional) the center, defaults to the row means |
... |
Additional arguments passed to specific methods. |
dim. |
An |
The S4 methods for x
of type matrix
,
array
, or numeric
call
matrixStats::rowSds
/ matrixStats::colSds
.
Returns a numeric
vector
of length N (K).
matrixStats::rowSds()
and
matrixStats::colSds()
which are used when
the input is a matrix
or numeric
vector.
For mean estimates, see rowMeans2()
and
rowMeans()
.
For variance estimates, see rowVars()
.
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,] -1.7222884 0.8804427 -0.8472874
[2,] NA 1.0159006 0.7977075
[3,] -0.7371888 -0.9449157 Inf
[4,] 0.0000000 1.6628771 -0.8064812
[5,] -1.1906033 0.8259630 2.2510455
[1] 1.324442 NA NaN 1.259186 1.729275
[1] NA 0.9721607 NaN
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.