R/normalize.R

Defines functions normalize

Documented in normalize

#' 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, rows and columns info, and normalized matrix.
#'
#' @export
#'
#' @examples
#' normalize(dematel::hospitaldata)
#' normalize(dematel::nurseselection)
#' normalize(dematel::medicaldevice)
normalize <- function(x) {

  # Include an error if x is not a matrix
  x <- check_data(x)

  # Create a list
  return(list(data = x,
              normalized_matrix = normalize_data(x)))
}
muhlisoz/dematel documentation built on Feb. 16, 2021, 12:06 a.m.