Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findExperiments arguments #6

Open
berndbischl opened this issue Oct 11, 2014 · 0 comments
Open

findExperiments arguments #6

berndbischl opened this issue Oct 11, 2014 · 0 comments

Comments

@berndbischl
Copy link
Contributor

There is a problem when one want to program on stuff like prob.pars.

Imagine you want to create such an expression by programming.

Here is a diff that might fix this

--- a/R/findExperiments.R
+++ b/R/findExperiments.R
@@ -48,15 +48,14 @@ findExperiments = function(reg, ids, prob.pattern, prob.pars
     return(ids)

   jobs = getJobs(reg, ids, check.ids = FALSE)
-
   if (!missing(prob.pars)) {
     ind = vapply(jobs, function(job, pars, ee) eval(pars, job$prob.pars, ee),
-                 logical(1L), pars = substitute(prob.pars), ee = parent.frame()
+                 logical(1L), pars = prob.pars, ee = parent.frame())
     jobs = jobs[!is.na(ind) & ind]
   }
   if (!missing(algo.pars)) {
     ind = vapply(jobs, function(job, pars, ee) eval(pars, job$algo.pars, ee),
-                 logical(1L), pars = substitute(algo.pars), ee = parent.frame()
+                 logical(1L), pars = algo.pars, ee = parent.frame())
     jobs = jobs[!is.na(ind) & ind]
   }
   return(extractSubList(jobs, "id", element.value = integer(1L)))

If we touch this we need to properly test different cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant