Description Usage Arguments Details Value See Also Examples
Check if all elements in a row (column) of a matrix-like object are equal to a value.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | rowAlls(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, ...)
## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric'
rowAlls(x, rows = NULL,
cols = NULL, value = TRUE, na.rm = FALSE, dim. = dim(x), ...)
## S4 method for signature 'ANY'
rowAlls(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, ...)
colAlls(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, ...)
## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric'
colAlls(x, rows = NULL,
cols = NULL, value = TRUE, na.rm = FALSE, dim. = dim(x), ...)
## S4 method for signature 'ANY'
colAlls(x, rows = NULL, cols = NULL, value = TRUE, na.rm = FALSE, ...)
|
x |
An NxK matrix-like object. |
rows, cols |
A |
value |
The value to search for. |
na.rm |
If |
... |
Additional arguments passed to specific methods. |
dim. |
An |
The S4 methods for x
of type matrix
,
array
, or numeric
call
matrixStats::rowAlls
/ matrixStats::colAlls
.
Returns a logical
vector
of length N (K).
matrixStats::rowAlls()
and
matrixStats::colAlls()
which are
used when the input is a matrix
or numeric
vector.
For checks if any element is equal to a value, see
rowAnys()
.
base::all()
.
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.6948091 -0.93291930 -0.8746249
[2,] NA 0.28389327 0.8722176
[3,] 0.2649759 1.23008933 Inf
[4,] 0.0000000 0.03062003 1.2443773
[5,] 0.1572172 -0.13450180 1.1959307
[1] TRUE NA TRUE FALSE TRUE
[1] FALSE TRUE TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.