| rowQuantiles {MatrixGenerics} | R Documentation |
Calculates quantiles for each row (column) of a matrix-like object.
rowQuantiles(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, ..., useNames = NA, drop = TRUE) ## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric' rowQuantiles(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, ..., useNames = NA, drop = TRUE) ## S4 method for signature 'ANY' rowQuantiles(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, ..., useNames = NA, drop = TRUE) colQuantiles(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, ..., useNames = NA, drop = TRUE) ## S4 method for signature 'matrix_OR_array_OR_table_OR_numeric' colQuantiles(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, ..., useNames = NA, drop = TRUE) ## S4 method for signature 'ANY' colQuantiles(x, rows = NULL, cols = NULL, probs = seq(from = 0, to = 1, by = 0.25), na.rm = FALSE, type = 7L, ..., useNames = NA, drop = TRUE)
x |
An NxK matrix-like object. |
rows, cols |
A |
probs |
A numeric vector of J probabilities in [0, 1]. |
na.rm |
|
type |
An integer specifying the type of estimator. See
|
... |
Additional arguments passed to specific methods. |
useNames |
If |
drop |
If |
The S4 methods for x of type matrix,
array, or numeric call
matrixStats::rowQuantiles
/ matrixStats::colQuantiles.
a numeric NxJ (KxJ)
matrix, where N (K) is the number of rows (columns) for
which the J values are calculated.
matrixStats::rowQuantiles() and
matrixStats::colQuantiles() which
are used when the input is a matrix or numeric vector.
mat <- matrix(rnorm(15), nrow = 5, ncol = 3) mat[2, 1] <- NA mat[3, 3] <- Inf mat[4, 1] <- 0 print(mat) rowQuantiles(mat) colQuantiles(mat)