Reverse a scale
Computes x = sz+c, which is the inverse of z = (x - c)/s
provided by the scale
function.
unscale(z, center = attr(z, "scaled:center"), scale = attr(z, "scaled:scale"))
z |
a numeric matrix(like) object |
center |
either NULL or a numeric vector of length equal to the number of columns of z |
scale |
either NULL or a numeric vector of length equal to the number of columns of z |
Neal Fultz
mtcs <- scale(mtcars) all.equal( unscale(mtcs), as.matrix(mtcars), check.attributes=FALSE ) oldSeed <- .Random.seed z <- unscale(rnorm(10), 2, .5) .Random.seed <- oldSeed x <- rnorm(10, 2, .5) all.equal(z, x, check.attributes=FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.