Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

mosaic (version 0.10.0)

rescale: Rescale

Description

Rescale vectors or variables within data frames. This can be useful for comparing vectors that are on different scales, for example in parallel plots or heatmaps.

Usage

rescale(x, range, domain, ...)

## S3 method for class 'data.frame': rescale(x, range = c(0, 1), domain, ...)

## S3 method for class 'factor': rescale(x, range, domain = range(1:nlevels(x)), ...)

## S3 method for class 'numeric': rescale(x, range = c(0, 1), domain = range(x, na.rm = TRUE), ...)

## S3 method for class 'default': rescale(x, range = c(0, 1), domain, ...)

## S3 method for class 'character': rescale(x, range = c(0, 1), domain, ...)

Arguments

x
an R object to rescale
range
a numeric vector of length 2
domain
a numeric vector of length 2
...
additional arguments