Learn R Programming

piecenorms (version 1.1.0)

piecenorm: Get piecewse normalised values from a vector of observations

Description

Get piecewse normalised values from a vector of observations

Usage

piecenorm(obs, breaks, polarity = 1)

Value

Vector of normalised observations

Arguments

obs

A vector of observations.

breaks

The breaks to normalise to.

polarity

Which direction should the normalisation occur.

Examples

Run this code
obs <- exp(1:10)
breaks <- c(min(obs), 8, 20, 100, 1000, 25000)
y <- piecenorm(obs, breaks)
plot(obs, y, type = 'l',
xlab = "Original Values",
ylab = "Normalised Values")

Run the code above in your browser using DataLab