R/std.R

Defines functions std

Documented in std

#' Unity-based Normalization
#'
#' Unity-based normalization of a vector.
#' @param x A vector to normalize.
#' @keywords plot fit powerlaw distributions
#' @export std
#' @examples
#' x = moby
#' z = std(x)

std = function(x)
{
  z = (x-min(x)) / (max(x)-min(x))
  return(z)
}

Try the staTools package in your browser

Any scripts or data that you put into this service are public.

staTools documentation built on May 2, 2019, 2:17 a.m.