Range scaling

scRange(x, ra)

Arguments

x

num array to be scaled

ra

num array, desired value range

Value

num array, same length as x

Details

x-scaled, so that values fall between range of ra

NA

See also

Other NMR ++: .hotellingsT2(), cvanova(), es_cdelta(), minmax(), opls_perm(), pca(), plotscores(), pqn(), predict_opls()

Author

torben.kimhofer@gmail.com

Examples

x=rnorm(20, 0, 1) plot(x, type='l'); abline(h=range(x), lty=2)
points(scRange(x, ra=c(5,15)), type='l', col='red'); abline(h=c(0,1), col='red', lty=2)