scale2 {hacks}R Documentation

Scale a vector into [0, 1]

Description

Scales a vector into numbers between zero and one.

Usage

scale2(x)

Arguments

x A numeric vector.

Details

This function subtracts the minimum from the vector and then divides by the range of the vector. The result is a vector with a minimum of zero and a maximum of one. Missing values are ignored.

Author(s)

Nathan Stephens

See Also

scale

Examples

scale2(rivers)

[Package hacks version 0.1-8 Index]