Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

scaleXY

Scale data to given minimum and maxiumum


Description

This is a convenient way to scale data to given minimum and maxiumum without full standarization, ie without deviding by the sd.

Usage

scaleXY(x, min = 0, max = 1)

Arguments

x

(numeric) vector to rescacle

min

(numeric) minimum value in output

max

(numeric) maximum value in output

Value

vector of rescaled data (in dimensions as input)

See Also

Examples

dat <- matrix(2*round(runif(100),2), ncol=4)
range(dat)
dat1 <- scaleXY(dat, 1,100)
range(dat1)
summary(dat1)
## scale for each column individually
dat2 <- apply(dat, 2, scaleXY, 1, 100)
range(dat2)
summary(dat2)

wrMisc

Analyze Experimental High-Throughput (Omics) Data

v1.5.4
GPL-3
Authors
Wolfgang Raffelsberger [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.