Tags {batchtools} | R Documentation |
Add or Remove Job Tags
Description
Add and remove arbitrary tags to jobs.
Usage
addJobTags(ids = NULL, tags, reg = getDefaultRegistry())
removeJobTags(ids = NULL, tags, reg = getDefaultRegistry())
getUsedJobTags(ids = NULL, reg = getDefaultRegistry())
Arguments
ids |
[ |
tags |
[ |
reg |
[ |
Value
[data.table
] with job ids affected (invisible).
Examples
tmp = makeRegistry(file.dir = NA, make.default = FALSE)
ids = batchMap(sqrt, x = -3:3, reg = tmp)
# Add new tag to all ids
addJobTags(ids, "needs.computation", reg = tmp)
getJobTags(reg = tmp)
# Add more tags
addJobTags(findJobs(x < 0, reg = tmp), "x.neg", reg = tmp)
addJobTags(findJobs(x > 0, reg = tmp), "x.pos", reg = tmp)
getJobTags(reg = tmp)
# Submit first 5 jobs and remove tag if successful
ids = submitJobs(1:5, reg = tmp)
if (waitForJobs(reg = tmp))
removeJobTags(ids, "needs.computation", reg = tmp)
getJobTags(reg = tmp)
# Grep for warning message and add a tag
addJobTags(grepLogs(pattern = "NaNs produced", reg = tmp), "div.zero", reg = tmp)
getJobTags(reg = tmp)
# All tags where tag x.neg is set:
ids = findTagged("x.neg", reg = tmp)
getUsedJobTags(ids, reg = tmp)
[Package batchtools version 0.9.17 Index]