powered by
This function allows multiplying values of 'mat' by its colnames and (optionally) summing along rows.
.multMatByColNa( mat, sumByRow = TRUE, silent = FALSE, debug = FALSE, callFrom = NULL )
This functions returns a numeric vector or a matrix if sumByRow=FALSE
sumByRow=FALSE
(matrix) main input
(logical)
(logical) suppress messages
(logical) additional messages for debugging
(character) allows easier tracking of messages produced
convToNum
mat1 <- 3 + matrix(1:4, ncol=2, dimnames=list(letters[1:2], c("3","2"))) .multMatByColNa(mat1) .multMatByColNa(mat1, sumByRow=FALSE)
Run the code above in your browser using DataLab