View source: R/batchExpandGrid.R
batchExpandGrid | R Documentation |
Maps an n-ary-function over a list of all combinations which are given by some vectors.
Internally expand.grid
is used to compute the combinations, then
batchMap
is called.
batchExpandGrid(reg, fun, ..., more.args = list())
reg |
[ |
fun |
[ |
... |
[any] |
more.args |
[ |
[data.frame
]. Expanded grid of combinations produced by expand.grid
.
reg = makeRegistry(id = "BatchJobsExample", file.dir = tempfile(), seed = 123) f = function(x, y, z) x * y + z # lets store the param grid grid = batchExpandGrid(reg, f, x = 1:2, y = 1:3, more.args = list(z = 10)) submitJobs(reg) waitForJobs(reg) y = reduceResultsVector(reg) # later, we can always access the param grid like this grid = getJobParamDf(reg) cbind(grid, y = y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.