daprpr | R Documentation |
Data preprocessing, classical and robust centering and scaling.
daprpr(Data, center.type, scale.type)
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. |
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)
.
daprpr
returns the scaled data with attributes "Center"
, "Scale"
and "Type"
.
Sven Serneels
crm
, spadimo
, predict.crm
, cellwiseheatmap
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.