opt_binary_brute {jwutil} | R Documentation |
The optimization function is called with the data frame x
and the names of
each combination of the names of x
's columns. An example of real-world
usage is to automate selection of columns according to the optimization
function.
opt_binary_brute(x, fun = opt_binary_fun, verbose = FALSE)
x |
data frame |
fun |
function which takes parameters |
verbose |
single logical value, if |
j <- data.frame(a = 1:5, b = 6:2, c = c(0, 2, 4, 6, 8)) opt_binary_brute(j) j[1, 1] <- NA j[1:4, 2] <- NA my_opt_fun <- function(x, n) sum(!unlist(lapply(x, is.na))) opt_binary_brute(j, fun = my_opt_fun)