# rescale

From scales v0.4.1
by Hadley Wickham

##### Rescale numeric vector to have specified minimum and maximum.

Rescale numeric vector to have specified minimum and maximum.

- Keywords
- manip

##### Usage

`rescale(x, to = c(0, 1), from = range(x, na.rm = TRUE, finite = TRUE))`

##### Arguments

- x
- numeric vector of values to manipulate.
- to
- output range (numeric vector of length two)
- from
- input range (numeric vector of length two). If not given, is
calculated from the range of
`x`

##### Examples

`library(scales)`

```
rescale(1:100)
rescale(runif(50))
rescale(1)
```

*Documentation reproduced from package scales, version 0.4.1, License: MIT + file LICENSE*

### Community examples

Looks like there are no examples yet.