rectscale {plgp}R Documentation

Un/Scale data in a bounding rectangle

Description

Scale data lying in an arbitrary rectangle to lie in the unit rectangle, and back again

Usage

rectscale(X, rect)
rectunscale(X, rect)

Arguments

X

a matrix or data.frame of real-valued covariates

rect

a matrix describing a bounding rectangle for X with 2 columns and ncol(X) rows

Value

a matrix or data.frame with the same dimensions as X scaled or un-scaled as appropriate

Author(s)

Robert B. Gramacy, rbg@vt.edu

References

https://bobby.gramacy.com/r_packages/plgp/

Examples

X <- matrix(runif(10, 1, 3), ncol=2)
rect <- rbind(c(1,3), c(1,3))
Xs <- rectscale(X, rect)
rectunscale(Xs, rect)

[Package plgp version 1.1-12 Index]