decscale: Decimal Scaling

Description Usage Arguments Details Value Author(s) Examples

View source: R/decscale.R

Description

This is a function to apply decimal scaling to a matrix or dataframe. Decimal scaling transforms the data into [-1,1] by finding k such that the absolute value of the maximum value of each attribute divided by 10\^k is less than or equal to 1.

Usage

1

Arguments

data

The dataset to be scaled

Details

Uses the scale function found in the R base package.

Value

decdata

The original matrix that has been scaled by decimal scaling

Author(s)

Caroline Rodriguez and Edgar Acuna

Examples

1
2
3
4
5
6
data(sonar)
def=par(mfrow=c(2,1))
plot(sonar[,2])
dssonar=decscale(sonar)
plot(dssonar[,2])
par(def)

Example output

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 

dprep documentation built on May 29, 2017, 11:01 a.m.