Learn R Programming

BatchExperiments (version 1.2)

findExperiments: Find ids of experiments that match a query.

Description

Find ids of experiments that match a query.

Usage

findExperiments(reg, ids, prob.pattern, prob.pars, algo.pattern, algo.pars,
  repls, match.substring = TRUE)

Arguments

reg
[ExperimentRegistry] Registry.
ids
[integer] Ids of selected experiments to restrict to. Default is all experiments.
prob.pattern
[character(1)] If not missing, all problem ids that match this string are selected.
prob.pars
[R expression] If not missing, all problems whose parameters match the given expression are selected.
algo.pattern
[character(1)] If not missing, all algorithm ids that match this string are selected.
algo.pars
[R expression] If not missing, all algorithms whose parameters match the given expression are selected.
repls
[integer] If not missing, restrict to jobs with given replication numbers.
match.substring
[logical(1)] Is a match in prob.pattern and algo.pattern if the id contains the pattern as substring or must the id exactly match? Default is TRUE.

Value

  • [integer]. Ids for experiments which match the query.

Examples

Run this code
reg = makeExperimentRegistry(id = "example1", file.dir = tempfile())
p1 = addProblem(reg, "one", 1)
p2 = addProblem(reg, "two", 2)
a = addAlgorithm(reg, "A", fun = function(static, n) static + n)
addExperiments(reg, algo.design = makeDesign(a, exhaustive = list(n = 1:4)))
findExperiments(reg, prob.pattern = "one")
findExperiments(reg, prob.pattern = "o")
findExperiments(reg, algo.pars = (n > 2))

Run the code above in your browser using DataLab