scaling: Scaling Data

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

Description

Auxiliary function to scale data.

Usage

1
scale01(x, method=c("columnwise", "rowwise", "all", "pobs"), ...)

Arguments

x

A numeric vector or (n,d)-matrix or (n,d)-data.frame containing the data to be scaled to [0,1].

method

A character string indicating the scaling method to be used. Available are:

"columnwise":

Scales x columnwise.

"rowwise":

Scales x rowwise.

"all":

Scales all components of x simultaneously.

"pobs":

Applies columnwise the respective empirical distribution function to x; see the R\ package “copula” for more details.

...

Additional arguments passed to rank() (for method="pobs") and range() (for all other methods).

Details

If x is a matrix and method="columnwise", the same scaling can be achieved, for example, with scale(x, center=apply(z, 2, min), scale=apply(z, 2, function(x) diff(range(x)))).

Value

scale01() returns a matrix of the same dimensions as x, but linearly scaled to lie in [0,1].

Author(s)

Marius Hofert and Wayne Oldford

See Also

zenplot() where scale01() is used. scale() for center-scale type of scaling of matrix-like objects (only).

Examples

1
2
## Implementation
scale01

zenplots documentation built on May 2, 2019, 4:34 p.m.

Related to scaling in zenplots...