Utilities.
unscale(scaledx,ctrs=NULL,sds=NULL)
mmscale(m,scalePars=NULL,p=NULL)
catDFRow(dfRow)
constCols(d)
allNumeric(lst)
A matrix.
A matrix.
Take the original means to be ctrs
An R list.
Take the original standard deviations to be sds
A row in a data frame.
A data frame or matrix.
If not NULL, a 2-row matrix, with column i
storing
the min and max values to be used in scaling column i
of m
.
Typically, one has previously called mmscale
on a dataset and
saved the resulting scale parameters, and we wish to use those
same scale parameters on new data.
If m
is a vector, this specifies the
number of columns it should have as a matrix. The code will try to take
care of this by itself if p
is left at NULL.
The function unscale
returns the original object to which
scale
had been applied. Or, the attributes ctrs
and
sds
can be specified by the user.
The function mmscale
is meant as a better-behaved alternative to
scale
. Using minimum and maximum values, it maps variables to
[0,1], thus avoiding the problems arising from very small standard
deviations in scale
.
The function catDFRow
nicely prints a row of a data frame.
The function constCols
determines which columns of a data frame
or matrix are constant, if any.