rng: Undertakes a Range Transformation on the Columns of a Matrix

Description Usage Arguments Value Note Author(s) See Also Examples

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

1
rng(xx)

Arguments

xx

a n by p matrix to be range transformed.

Value

x

a n by p matrix of range-transformed values.

Note

Any less than detection limit values represented by negative values, or zeros or other numeric codes representing blanks in the data, must be removed prior to executing this function, see ltdl.fix.df.

Any rows containing NAs in the data matrix are removed prior to undertaking the transformation.

A range transform may be appropriate for cluster analysis, including 2-d projection displays, applications to ensure all measured variables have equal weight.

Author(s)

Robert G. Garrett

See Also

remove.na

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Make test data available
data(sind)
sind.mat <- as.matrix(sind[, -c(1:3)])

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

## Clean-up
rm(sind.mat)
rm(temp)


Search within the rgr package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.