R/factorizeMatrix.R

Defines functions factorizeMatrix

Documented in factorizeMatrix

#' Divides each row of a matrix by the elements of the specified row
#'
#' @param data expression data
#' @param row reference row
#'
#' @return
#' @export
#'
#'
factorizeMatrix <- function(data, row) {

  if(!hasArg(data)) {
    data <- getDataFrame()
  }

  if(!hasArg(row)) {
    row <- whatToDo("Which row should serve as reference?", rownames(data))
  }

  t(t(data) / data[row, ])

}
nicohuttmann/htmnanalysis documentation built on Dec. 6, 2020, 3:02 a.m.