mat_op
mat_op.Rd
Assemble several matrices of same dimensions by performing by case operation. For instance, with kind.of.operation = "+", the function will add the value of all the case 1 (row1 & column1) of the matrices and put it in the case 1 of a new matrix M, according to the formula
$$c_{ij} = \sum_{k=1}^{k=z}c_{ijk}$$ c: case
i: row number
j: column number
k: matrix number
z: number of matrices
Arguments
- mat.list
List of matrices.
- kind.of.operation
Either "+" (by case addition), "-" (by case subtraction) or "*" (by case multiplication).
- safer_check
Single logical value. Perform some "safer" checks (see https://github.com/safer-r)? If TRUE, checkings are performed before main code running: 1) R classical operators (like "<-") not overwritten by another package because of the R scope and 2) required functions and related packages effectively present in local R lybraries. Set to FALSE if this fonction is used inside another "safer" function to avoid pointless multiple checkings.
Value
The assembled matrix, with row and/or column names only if all the matrices have identical row/column names.