Implements the S4groupGeneric group generic functions for dbMatrix objects.
Usage
# S4 method for class 'dbMatrix'
Summary(x, ..., na.rm = TRUE)
Arguments
- x
A dbMatrix object.
- ...
Additional arguments (not used, but included for compatibility with the generic).
- na.rm
Logical. If TRUE, remove NA values before computation. Always set to TRUE for this implementation.
Value
The result of applying the respective summary function to the dbMatrix object.
The type of the return value depends on the specific function called.
Details
This method provides implementations for the following S4groupGeneric functions:
max(): Maximum value
min(): Minimum value
range(): Not supported
prod(): Product of all values
sum(): Sum of all values
any(): Returns TRUE if any value is TRUE
all(): Returns TRUE if all values are TRUE
Examples
mat <- matrix(1, nrow = 3, ncol = 3)
dbmat <- as.dbMatrix(mat)
max(dbmat)
#> [1] 1
min(dbmat)
#> [1] 1
prod(dbmat)
#> [1] 1
sum(dbmat)
#> [1] 9
any(dbmat > 0)
#> [1] TRUE
all(dbmat > 0)
#> [1] TRUE