#' Normalize Data
#'
#' Normalizes matrix format data
#'
#' @param x a matrix containing the values of direct relationship decision matrix.
#'
#' @return This function returns a \code{list} of data, and normalized matrix.
#'
normalize_data <- function(x) {
sum_of_rows <- apply(x, 1, sum)
sum_of_columns <- apply(x, 2, sum)
maximum_of_rows_and_column <- max(sum_of_rows, sum_of_columns)
return(normalized_matrix = round(x/maximum_of_rows_and_column, 5))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.