IterableMatrix methods
Source:R/matrix.R, R/matrix_stats.R, R/transforms.R
IterableMatrix-methods.RdGeneric methods and built-in functions for IterableMatrix objects
Usage
matrix_type(x)
storage_order(x)
# S4 method for class 'IterableMatrix'
show(object)
# S4 method for class 'IterableMatrix'
t(x)
# S4 method for class 'IterableMatrix,matrix'
x %*% y
# S4 method for class 'IterableMatrix'
rowSums(x)
# S4 method for class 'IterableMatrix'
colSums(x)
# S4 method for class 'IterableMatrix'
rowMeans(x)
# S4 method for class 'IterableMatrix'
colMeans(x)
colVars(
x,
rows = NULL,
cols = NULL,
na.rm = FALSE,
center = NULL,
...,
useNames = TRUE
)
rowVars(
x,
rows = NULL,
cols = NULL,
na.rm = FALSE,
center = NULL,
...,
useNames = TRUE
)
rowMaxs(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE)
colMaxs(x, rows = NULL, cols = NULL, na.rm = FALSE, ..., useNames = TRUE)
rowQuantiles(
x,
rows = NULL,
cols = NULL,
probs = seq(from = 0, to = 1, by = 0.25),
na.rm = FALSE,
type = 7L,
digits = 7L,
...,
useNames = TRUE,
drop = TRUE
)
colQuantiles(
x,
rows = NULL,
cols = NULL,
probs = seq(from = 0, to = 1, by = 0.25),
na.rm = FALSE,
type = 7L,
digits = 7L,
...,
useNames = TRUE,
drop = TRUE
)
# S4 method for class 'IterableMatrix'
log1p(x)
log1p_slow(x)
# S4 method for class 'IterableMatrix'
expm1(x)
expm1_slow(x)
# S4 method for class 'IterableMatrix,numeric'
e1^e2
# S4 method for class 'numeric,IterableMatrix'
e1 < e2
# S4 method for class 'IterableMatrix,numeric'
e1 > e2
# S4 method for class 'numeric,IterableMatrix'
e1 <= e2
# S4 method for class 'IterableMatrix,numeric'
e1 >= e2
# S4 method for class 'IterableMatrix'
round(x, digits = 0)
# S4 method for class 'IterableMatrix,numeric'
e1 * e2
# S4 method for class 'IterableMatrix,numeric'
e1 + e2
# S4 method for class 'IterableMatrix,numeric'
e1/e2
# S4 method for class 'IterableMatrix,numeric'
e1 - e2Arguments
- x
IterableMatrix object or a matrix-like object.
- object
IterableMatrix object
- y
matrix
- probs
(Numeric) Quantile value(s) to be computed, between 0 and 1.
- type
(Integer) between 4 and 9 selecting which quantile algorithm to use, detailed in
matrixStats::rowQuantiles()
Value
t()Transposed object
x %*% y: dense matrix result
rowSums(): vector of row sums
colSums(): vector of col sums
rowMeans(): vector of row means
colMeans(): vector of col means
colVars(): vector of col variance
rowVars(): vector of row variance
rowMaxs(): vector of maxes for every row
colMaxs(): vector of column maxes
rowQuantiles():Iflength(probs) == 1, return a numeric with number of entries equal to the number of rows in the matrix. Else, return a Matrix of quantile values, with cols representing each quantile, and each row representing a row in the input matrix.
colQuantiles():Iflength(probs) == 1, return a numeric with number of entries equal to the number of columns in the matrix. Else, return a Matrix of quantile values, with cols representing each quantile, and each row representing a col in the input matrix.
Functions
matrix_type(): Get the matrix data type (mat_uint32_t, mat_float, or mat_double for now)storage_order(): Get the matrix storage order ("row" or "col")show(IterableMatrix): Display an IterableMatrixt(IterableMatrix): Transpose an IterableMatrixx %*% y: Multiply by a dense matrixrowSums(IterableMatrix): Calculate rowSumscolSums(IterableMatrix): Calculate colSumsrowMeans(IterableMatrix): Calculate rowMeanscolMeans(IterableMatrix): Calculate colMeanscolVars(): Calculate colVars (replacement formatrixStats::colVars())rowVars(): Calculate rowVars (replacement formatrixStats::rowVars())rowMaxs(): Calculate rowMaxs (replacement formatrixStats::rowMaxs())colMaxs(): Calculate colMax (replacement formatrixStats::colMax())rowQuantiles(): Calculate rowQuantiles (replacement formatrixStats::rowQuantiles)colQuantiles(): Calculate colQuantiles (replacement formatrixStats::colQuantiles)log1p(IterableMatrix): Calculate log(x + 1)log1p_slow(): Calculate log(x + 1) (non-SIMD version)expm1(IterableMatrix): Calculate exp(x) - 1expm1_slow(): Calculate exp(x) - 1 (non-SIMD version)e1^e2: Calculate x^y (elementwise)e1 < e2: Binarize matrix according to numeric < matrix comparisone1 > e2: Binarize matrix according to matrix > numeric comparisone1 <= e2: Binarize matrix according to numeric <= matrix comparisone1 >= e2: Binarize matrix according to matrix >= numeric comparisonround(IterableMatrix): round to nearest integer (digits must be 0)e1 * e2: Multiply by a constant, or multiply rows by a vector length nrow(mat)e1 + e2: Add a constant, or row-wise addition with a vector length nrow(mat)e1 / e2: Divide by a constant, or divide rows by a vector length nrow(mat)e1 - e2: Subtract a constant, or row-wise subtraction with a vector length nrow(mat)
