unscale | R Documentation |
The unscale
function unscales a numeric marteix that has been either
centered or scaled by the scale
function. This is done by
reversing the first unscaling and then uncentering based on the
object's attributes.
unscale(x, unscale = TRUE, uncenter = TRUE)
x |
a numeric matrix(like object) that has been centered and/or scaled by the
|
unscale |
a logical value defining whether to unscale |
uncenter |
a logical value defining whether to uncenter |
x <- matrix(1:16, 4, 4) xcs <- scale(x, center=TRUE, scale=TRUE) # centered and scaled xc <- scale(x, center=TRUE, scale=FALSE) # centered only xs <- scale(x, center=FALSE, scale=TRUE) # scaled only # compare difference to original x - unscale(xcs) x - unscale(xc) x - unscale(xs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.