\donttest{
tmp <- tempfile(fileext = ".h5")
M <- hdf5_create_matrix(tmp, "data/M", data = diag(5))
R <- diag_scale(M, scalar = 3, op = "multiply")
hdf5_close_all()
unlink(tmp)
}diag_scale
diag_scale
MATRIX_UTILS
1 Description
Applies a scalar arithmetic operation to the diagonal elements of an HDF5Matrix. Off-diagonal elements are not modified. Delegates to bdDiag_scalar_hdf5().
2 Usage
diag_scale(x, scalar, op = "multiply", ...)3 Arguments
| Parameter | Description |
|---|---|
x |
An . |
scalar |
Numeric scalar. |
op |
Operation: , , (default), or . |
outgroup |
Character or . HDF5 group where the result is stored. Default . |
outdataset |
Character or . Dataset name for the result. |
overwrite |
Logical. If , overwrite the existing result dataset. Default . |
4 Value
A new .