| unscale | R Documentation |
This function revert a Matrix-like object that is scaled or centered via scale.default to data with the original scale/center.
unscale(x)
x |
numeric matrix(like object). |
a matrix that are re-centered or un-scaled, based on the value of attributes "scaled:center" and "scaled:scale" of x. If neither of those attributes is specified, x is returned.
scale
require(stats)
x <- matrix(1:10, ncol=2)
unscale(z <- scale(x))
#maybe useful for truncating
trunc <- 1
z[abs(z) > trunc] <- sign(z[abs(z) > trunc])*trunc
unscale(z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.