scale2: Scaling Vectors and Matrices

View source: R/GAMart.R

scale2R Documentation

Scaling Vectors and Matrices

Description

The function scales numeric objects to specific ranges.

Usage

scale2(x, lower = -1.5, upper = 1.5)

Arguments

x

Numeric, vector or matrix.

lower

The upper range.

upper

The lower range.

Value

A scaled numeric vector or matrix, scaled to the range provided in lower and upper.

Examples

set.seed(123)
x <- runif(5)
scale2(x, -1, 1)
scale2(x, 0, 10)

bamlss documentation built on March 19, 2024, 3:08 a.m.