Description Usage Arguments Examples
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.
1 | opt_binary_brute(x, fun = opt_binary_fun, verbose = FALSE)
|
x |
data frame |
fun |
function which takes parameters |
verbose |
single logical value, if |
1 2 3 4 5 6 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.