Learn R Programming

scales (version 0.2.0)

squish_infinite: Squish infinite values to range.

Description

Squish infinite values to range.

Usage

squish_infinite(x, range = c(0, 1))

Arguments

x
numeric vector of values to manipulate.
range
numeric vector of length two giving desired output range.

Examples

Run this code
squish_infinite(c(-Inf, -1, 0, 1, 2, Inf))

Run the code above in your browser using DataLab