tudo-r / BatchExperiments

BatchExperiments: Statistical experiments on batch computing clusters
Other
17 stars 5 forks source link

getAlgorithmIds returns NULL if ids argument is used #14

Closed schiffner closed 6 years ago

schiffner commented 8 years ago

Here is a small example:

library(BatchExperiments)

reg <- makeExperimentRegistry(id="myExperiment")

bootstrapRows <- function(static, n, ...){
  sample.int(nrow(static), size=n, replace=TRUE, ...)
}

addProblem(reg, id="faithful", static=faithful)

fitGLM <- function(static,dynamic,formula,family){
  resampled <- static[dynamic,]
  glm(formula=formula, family=eval(parse(text=family)),data=resampled)
}

addAlgorithm(reg,"glmAlgorithm", fitGLM)

addExperiments(reg)

getAlgorithmIds(reg)
# [1] "glmAlgorithm"
getAlgorithmIds(reg, 1)
# NULL