Learn R Programming

plgp (version 1.1-12)

rectscale: 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)

Value

a matrix or data.frame with the same dimensions as

X scaled or un-scaled as appropriate

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

Author

Robert B. Gramacy, rbg@vt.edu

References

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

Examples

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

Run the code above in your browser using DataLab