Learn R Programming

crmReg (version 1.0.2)

daprpr: 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. "mean", "median", "l1median").

scale.type

type of scaling as R function name (e.g. "sd", "qn", "Sn", "scaleTau2").

Value

daprpr returns the scaled data with attributes "Center", "Scale" and "Type".

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).

See Also

crm, spadimo, predict.crm, cellwiseheatmap

Examples

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab