rescale: scale numeric vector

Description Usage Arguments Details Value Methods (by class)

View source: R/fun-rescale.R

Description

Scales a vector to a requested range.

Usage

1
2
3
4
5
6
7
rescale(x, range = c("positive", "negative", "both"))

## Default S3 method:
rescale(x, range = c("positive", "negative", "both"))

## S3 method for class 'matrix'
rescale(x, range = c("positive", "negative", "both"))

Arguments

x

a numeric vector or matrix

range

range which to scale to

Details

Values in the vector are scaled such to fill range:

Value

a numeric object of the same class as x

Methods (by class)


olobiolo/acutils documentation built on Nov. 28, 2021, 9:35 p.m.