Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

testJob

Run Jobs Interactively


Description

Starts a single job on the local machine.

Usage

testJob(id, external = FALSE, reg = getDefaultRegistry())

Arguments

id

[integer(1) or data.table]
Single integer to specify the job or a data.table with column job.id and exactly one row.

external

[logical(1)]
Run the job in an external R session? If TRUE, starts a fresh R session on the local machine to execute the with execJob. You will not be able to use debug tools like traceback or browser.

If external is set to FALSE (default) on the other hand, testJob will execute the job in the current R session and the usual debugging tools work. However, spotting missing variable declarations (as they are possibly resolved in the global environment) is impossible. Same holds for missing package dependency declarations.

reg

[Registry]
Registry. If not explicitly passed, uses the default registry (see setDefaultRegistry).

Value

Returns the result of the job if successful.

See Also

Examples

tmp = makeRegistry(file.dir = NA, make.default = FALSE)
batchMap(function(x) if (x == 2) xxx else x, 1:2, reg = tmp)
testJob(1, reg = tmp)
## Not run: 
testJob(2, reg = tmp)

## End(Not run)

batchtools

Tools for Computation on Batch Systems

v0.9.15
LGPL-3
Authors
Michel Lang [cre, aut] (<https://orcid.org/0000-0001-9754-0393>), Bernd Bischl [aut], Dirk Surmann [ctb] (<https://orcid.org/0000-0003-0873-137X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.