R/normalise.R

Defines functions normalise

normalise = function(x, oldmin, oldmax, newmin, newmax) {
  # Normalises the data in x
  n = (newmax - newmin)/(oldmax - oldmin)*(x - oldmax) + newmax
  return (n)
}

Try the egg package in your browser

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

egg documentation built on May 2, 2019, 5:55 p.m.