rerange

0th

Percentile

Linear transformation of data

The function performs a linear transformation of the data, such that afterwards range(data)=c(theMin,theMax).

Keywords
internal
Usage
rerange(data, min.goal = 0, max.goal = 1, min.data =
    min(data), max.data = max(data), center = NA)
Arguments
data

vector with the data to transform

min.goal

new minimum value

max.goal

new maximum value

min.data

old minimum value

max.data

old maximum value

center

which old value should become the new center (max.goal + min.goal) / 2)

Value

vector with the transformed data

Aliases
  • rerange
Examples
# NOT RUN {
   klaR:::rerange(data=1:20)
   klaR:::rerange(data=1:30, center=5)
# }
Documentation reproduced from package klaR, version 0.6-14, License: GPL-2

Community examples

Looks like there are no examples yet.