Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

transformx

Linear transformation


Description

Linear transformation of each column of a matrix. There are several choices of the type of centering and scaling.

Usage

transformx (x, scale.type = "unit.sd", x.center, x.scale)

Arguments

x

Matrix with columns to be transformed.

scale.type

Type of transformation the default is "unit.sd": subtract the mean and divide by the standard deviation. Other choices are "unscaled" (do nothing), "range" (transform to [0,1]),"user" (subtract a supplied location and divide by a scale).

x.center

A vector of centering values to subtract from each column.

x.scale

A vector of scaling values to subtract from each column.

Details

After deciding what the centering and scaling values should be for each column of x, this function just calls the standard utility scale. This function was created partly to attach the transformation information as attributes to the transformed matrix. It is used in Krig, cover.design, krig.image etc. to transform the independent variables.

Value

A matrix whose columns have between transformed. This matrix also has the attributes: scale.type, x.center and y.center with the transformation information.

See Also

scale

Examples

#
newx<-transformx( ChicagoO3$x, scale.type="range")

fields

Tools for Spatial Data

v11.6
GPL (>= 2)
Authors
Douglas Nychka [aut, cre], Reinhard Furrer [aut], John Paige [aut], Stephan Sain [aut], Florian Gerber [aut], Matthew Iverson [aut], University Corporation for Atmospheric Research [cph]
Initial release
2020-10-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.