dot-multMatByColNa: Multiply Values Of Matrix By Its Colnames And Sum By Row

.multMatByColNaR Documentation

Multiply Values Of Matrix By Its Colnames And Sum By Row

Description

This function allows multiplying values of 'mat' by its colnames and (optionally) summing along rows.

Usage

.multMatByColNa(
  mat,
  sumByRow = TRUE,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Arguments

mat

(matrix) main input

sumByRow

(logical)

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allows easier tracking of messages produced

Value

This functions returns a numeric vector or a matrix if sumByRow=FALSE

See Also

convToNum

Examples

mat1 <- 3 + matrix(1:4, ncol=2, dimnames=list(letters[1:2], c("3","2")))
.multMatByColNa(mat1)
.multMatByColNa(mat1, sumByRow=FALSE)

wrTopDownFrag documentation built on June 8, 2025, 1:34 p.m.