R/max_min_scale.R

Defines functions max_min_scale

Documented in max_min_scale

#' @title max_min_scale
#'
#' @description a function for max-min normalization for network propagation score
#'
#' @param x a numeric vector
#'
#' @return a numeric vector
#' @export
#'
#' @examples
#' \dontrun{
#' trs <- max_min_scale(ceiling_np)}
#'
max_min_scale <- function(x){
  scale_vec <- (x-min(x))/(max(x)-min(x))
  return(scale_vec)
}
fl-yu/SCAVENGE documentation built on April 2, 2022, 10:56 a.m.