#' 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, ])
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.