transform_maximise {moocore} | R Documentation |
Transform matrix according to maximise parameter
Description
Transform matrix according to maximise parameter
Usage
transform_maximise(x, maximise)
Arguments
x |
|
maximise |
|
Value
x
transformed such that every column where maximise
is TRUE
is multiplied by -1
.
Examples
x <- data.frame(f1=1:10, f2=101:110)
rownames(x) <- letters[1:10]
transform_maximise(x, maximise=c(FALSE,TRUE))
transform_maximise(x, maximise=TRUE)
x <- as.matrix(x)
transform_maximise(x, maximise=c(FALSE,TRUE))
transform_maximise(x, maximise=TRUE)
[Package moocore version 0.1.0 Index]