Learn R Programming

rgr (version 1.1.0)

rng: Undertakes a range transformation on the columns of a matrix

Description

Function to undertake a range transformation on a data matrix in order that each column is scaled zero-one between the minimum and maximum values.

Usage

rng(xx)

Arguments

xx
a n by p matrix to be range transformed.

Value

  • xa n by p matrix of range-transformed values.

See Also

remove.na

Examples

Run this code
## Make test data available
data(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])

## Undertake range transform
temp <- rng(sind.mat)
temp

## Clean-up and detach test data
rm(sind.mat)
rm(temp)

Run the code above in your browser using DataLab