scale_norm: Scale variable into normal range 0, 1

Description Usage Arguments Value Examples

Description

Perform calculation: (x - min(x)) / (max(x) - min(x))

Usage

1

Arguments

x

numeric vector

range

numeric vector additional values for shrinking distribution of values within the 0-1 space, without affecting limits of x

Value

numeric vector

Examples

1
2
3
4
scale_norm(x = c(-1, 4, 10, 182))
# lower bound extended beyond -1
# upper bound still range of data
scale_norm(x = c(-1, 4, 10, 182), range = c(-100, 100))

Example output

[1] 0.00000000 0.02732240 0.06010929 1.00000000
[1] 0.3510638 0.3687943 0.3900709 1.0000000

GPfit documentation built on May 2, 2019, 5:31 a.m.