uniform_scaling: Transform values to be uniformly distributed

Description Usage Arguments Value Author(s) Examples

View source: R/uniform-scaling.R

Description

Applies a rescaling that transforms the values into being uniformly distributed on the interval [0, 1].

Usage

1

Arguments

values

A numeric vector of values

Value

A numeric vector that contains the rescaled values

Author(s)

Mathias Isaksen mathiasleanderi@gmail.com

Examples

1
2
3
4
5
6
7
8
set.seed(123)
# Generate values from normal distribution
original.values = rnorm(100, -4, 5)
# The values lie between approximately -15.5 and 7
hist(original.values)
# Rescale values uniformly to the interval [0, 1]
uniform.values = uniform_scaling(original.values)
hist(uniform.values)

mathiasisaksen/artKIT documentation built on Dec. 21, 2021, 2:52 p.m.