Compute the sums/means of the rows/columns of a matrix.
Sweep a vector through the rows/cols of a matrix using an arithmetic operation.
dimops_rowsums(x, s = NULL) dimops_rowmeans(x, s = NULL) dimops_colsums(x, s = NULL) dimops_colmeans(x, s = NULL) dimops_rowsweep(x, s, op) dimops_colsweep(x, s, op)
x | Input matrix. |
---|---|
s | Either |
op | The operation: |
Returns the matrix sum.
Returns the matrix sum.