ynew <- standardize(y [,locs [,scales]]), n by p REAL matrix y, locs and scales REAL scalars or row or column vectors of length p, defaults mean and standard deviations |

ynew <- standardize(y), where y is a n by p REAL matrix, creates a n by p REAL matrix ynew with ynew[i,j] = (y[i,j] - ybar[j])/sd[j], where ybar and sd are vectors of column means and standard deviations of y. ynew will have column means = 0 and column standard deviations = 1. ynew <- standardize(y,locs), where locs is a REAL row or column vector of length p, does the same except ynew[i,j] = (y[i,j] - locs[j])/sd[j]. ynew <- standardize(y,locs,scales), where scales is a REAL row or column vector of length p, does the same except ynew[i,j] = (y[i,j] - locs[j])/scales[j]. If locs is a scalar, it is expanded to rep(locs, p). If scales is a scalar, it is expanded to rep(scales, p). Any means or standard deviations needed are computed by describe(y). MISSING elements are ignored except for a warning message. If any elements of locs are MISSING, they are replaced by the mean of the corresponding columns of y. If any elements of scales are MISSING, they are replaced by the standard deviations of the corresponding columns of y. See also describe().

Gary Oehlert 2003-01-15