daprpr {crmReg} | R Documentation |
Data Preprocessing
Description
Data preprocessing, classical and robust centering and scaling.
Usage
daprpr(Data, center.type, scale.type)
Arguments
Data |
the data. |
center.type |
type of centering as R function name (e.g. |
scale.type |
type of scaling as R function name (e.g. |
Details
daprpr
preprocesses the data by classical or robust centering and scaling.
Given center.type = "mean"
and scale.type = "sd"
, function daprpr
is
equivalent to scale(Data, center = TRUE, scale = TRUE)
.
Value
daprpr
returns the scaled data with attributes "Center"
, "Scale"
and "Type"
.
Author(s)
Sven Serneels
See Also
crm
, spadimo
, predict.crm
, cellwiseheatmap
Examples
library(crmReg)
data(topgear)
topgear_centered_scaled <- daprpr(topgear, center.type = "median", scale.type = "qn")
boxplot(topgear_centered_scaled)
attributes(topgear_centered_scaled)$Type
attributes(topgear_centered_scaled)$Center
attributes(topgear_centered_scaled)$Scale
[Package crmReg version 1.0.2 Index]