diag
diag
MATRIX_UTILS
1 Description
Overrides base::diag() to dispatch on HDF5Matrix objects. For plain R matrices/vectors the call is forwarded to base::diag().
When x is an HDF5Matrix, extracts the diagonal as an in-memory numeric vector (length = min(nrow, ncol)).
2 Usage
diag(x, ...)3 Arguments
| Parameter | Description |
|---|---|
x |
An or any object accepted by . |
nrow |
Passed to for non-HDF5Matrix objects. |
ncol |
Passed to for non-HDF5Matrix objects. |
names |
Passed to for non-HDF5Matrix objects. |
4 Value
For : numeric vector of diagonal elements. For plain R objects: result of .
5 See Also
\link[base]{diag}