scaleX: Scale a matrix to the unit hypercube

Description Usage Arguments Details Value Author(s) Examples

View source: R/rescale.R

Description

Scales a matrix to

[0, 1]^d

Usage

1
scaleX(x)

Arguments

x

An n x d matrix

Details

This function scales a matrix to the unit hypercube by subtracting off the minimum value in each column from each value and dividing by the range of that column.

Value

A matrix rescaled to

[0, 1]^d

with attributes "scaled:minimum" and "scaled:range"

Author(s)

Casey Davis (cbdavis33@gmail.com)

Examples

1
scaleX(matrix(runif(20, 0, 10), nrow = 10, ncol = 2))

cbdavis33/bcgp documentation built on Oct. 1, 2019, 8:07 a.m.