scale_midpoint: Rescale Continuous Vector (minimum, midpoint, maximum)

View source: R/transform.R

scale_midpointR Documentation

Rescale Continuous Vector (minimum, midpoint, maximum)

Description

Rescales continuous vector to have specified minimum, midpoint and maximum.

Usage

scale_midpoint(x, to = c(0, 1), from = range(x, finite = TRUE), midpoint = 0)

Arguments

x

A numeric vector.

to

A length-two numeric vector specifying the output range.

from

A length-two numeric vector specifying the input range.

midpoint

A length-one numeric vector specifying the mid-point of input range.

Value

A numeric vector.

Note

For internal use only.

See Also

Other data transformation tools: scale_range()


nfrerebeau/codex documentation built on May 6, 2024, 9:23 a.m.