# NOT RUN {
## no custom raw data transformations
d <- CompositeData(mtcars[, c("mpg", "hp", "wt", "qsec")],
thresholds = list(one = with(mtcars, c(
mpg = max(mpg),
hp = max(hp),
wt = min(wt),
qsec = min(qsec)))
),
higherisbetter = c(TRUE, TRUE, FALSE, FALSE))
## square root transform qsec
d <- CompositeData(mtcars[, c("mpg", "hp", "wt", "qsec")],
thresholds = list(one = with(mtcars, c(
mpg = max(mpg),
hp = max(hp),
wt = min(wt),
qsec = min(qsec)))
),
higherisbetter = c(TRUE, TRUE, FALSE, FALSE),
rawtrans = list(
mpg = function(x) x,
hp = function(x) x,
wt = function(x) x,
qsec = sqrt))
## cleanup
rm(d)
# }
Run the code above in your browser using DataLab