unscale: Reverse a scale

Description Usage Arguments Value See Also

Description

Computes x = sz+c, which is the inverse of z = (x - c)/s provided by the scale function.

Usage

1
unscale(z, center = attr(z, "scaled:center"), scale = attr(z, "scaled:scale"))

Arguments

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 a numeric vector of length equal to the number of columns of z

Value

data frame or matrix

See Also

scale mtcs <- scale(mtcars)

all.equal( unscale(mtcs), as.matrix(mtcars), check.attributes=FALSE )


St-Digital-Twin/Dtwin documentation built on Jan. 1, 2022, 8:11 p.m.