Learn R Programming

tiger (version 0.2.3.1)

to.uniform: Transform data to uniform distribution

Description

Transform data to uniform distribution. Optionally, a set of values can be transformed against a reference set of data.

Usage

to.uniform(ref, val = NA)

Arguments

ref
Set of values that determince the transformation
val
Values to be transformed

Value

Vector with transformed values.

Details

If values is NA, the reference set itself will be transformed.

Examples

Run this code
   a <- rnorm(100)
   hist(a)
   b <- to.uniform(a)
   hist(b)
   c <- to.uniform(ref=a, val=c(-0.5,0,0.5))

Run the code above in your browser using DataLab