run.algorithm | R Documentation |
Apply a template algorithm file to an objective function
run.algorithm( algorithm_file, objective_function, input, output = NULL, options = NULL, work_dir = ".", trace = function(...) cat(paste0(..., "\n")), silent = FALSE, save_data = TRUE )
algorithm_file |
templated algorithm file |
objective_function |
function to apply algorithm on |
input |
list of input arguments of function (eg. list(x1=list(min=0,max=1),x2=list(min=10,max=20))) |
output |
list of output names |
options |
algorithm options to overload default ones |
work_dir |
working directory to run algorithm. will store output files, images, .. |
trace |
display running info |
silent |
quietness |
save_data |
enable (by default) saving of data (in .Rds) along algorithm iterations. |
algorithm result (and algorithm object & files as attributes)
run.algorithm( system.file("Brent.R", package="templr"), function(x) sin(x)-0.75, list(x=list(min=0,max=pi/2)), work_dir=tempdir() )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.