[d79ff0]: / man / unscale.Rd

Download this file

35 lines (33 with data), 855 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unscale.R
\name{unscale}
\alias{unscale}
\title{Unscales a scaled data.frame}
\usage{
unscale(x)
}
\arguments{
\item{x}{A numeric matrix.}
}
\value{
Return a matrix, uncenterd and unscaled. Attributes "scaled:center" and
"scaled:scale" are removed.
}
\description{
\code{unscale} is a generic function that unscale and/or uncenter the columns
of a matrix generated by the scale base function
}
\details{
\code{unscale} uses attributes added by the scale function "scaled:scale" and
"scaled:center" and use these scaling factor to retrieve the initial matrix.
It first unscales and then uncenters.
}
\examples{
X <- matrix(1:9, ncol = 3)
X.scale <- scale(X, center = TRUE, scale = TRUE)
X.unscale <- unscale(X.scale)
all(X == X.unscale)
}
\seealso{
\code{\link[base]{scale}}
}