View source: R/cluster_execution.R
cluster_apply | R Documentation |
Run function for each row of input dataframe in LSF job.
cluster_apply(
df_iter,
func,
.bsub_params = c("-n", "2", "-W", "24:00", "-R", "rusage[mem=10000]"),
.tempdir = ".",
.packages = c(),
...
)
df_iter |
Dataframe over whose rows to iterate. |
func |
Function to apply to each dataframe row. Its arguments must be all dataframe columns. |
.bsub_params |
Parameters to pass to 'bsub' during job submission. |
.tempdir |
Location to store auxiliary files in. |
.packages |
Packages to import in each job. |
... |
Extra arguments for function. |
Dataframe created by concatenating results of each function call.
## Not run:
foo <- 42
cluster_apply(
data.frame(i = seq_len(3), group = c("A", "B", "C")),
function(i, group) {
log_debug("hello")
data.frame(group = group, i = i, foo = foo, result = foo + 2 * i)
},
.packages = c(logger)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.