Run function for each row of input dataframe in LSF job.
Dataframe over whose rows to iterate.
Function to apply to each dataframe row. Its arguments must be all dataframe columns.
Parameters to pass to `bsub` during job submission.
Location to store auxiliary files in.
Packages to import in each job.
Extra arguments for function.
Dataframe created by concatenating results of each function call.
if (FALSE) {
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)
)
}