Closed bart1 closed 7 years ago
The heuristic which detects if the parameters can be represented as data.table columns is broken.
flatten = FALSE
to getJobPars()
.I would probably expect the similar output as input for prob.designs so the following:
cbind(job.id=1:30,problem=factor("rnorm"), algorithm=factor("deviation"),data.table(expand.grid(n = list(100, 1:4), mean = -1:1, sd = 1:5)))
Thanks for the work around!
Heuristic is fixed. I'm thinking about dropping the heuristic and wrapping everything with length > 1 in a list... Need to sleep on it first though.
In the future I will just return lists. Your example nicely demonstrates that the parameters can virtually be anything, and it is impossible to get this right programmatically. I will offer a unwrap()
/unnest()
(similar to tidy::unnest()
) function to ease the transition and provide an easy way to get "flat" data tables for most use cases. I'm waiting for the next data.table
release though, there is a bug in rbindlist
which blocks this (see https://github.com/Rdatatable/data.table/pull/2077).
Fixed in 0.9.4.
Thank you very much for the fix, looking forward to the new release
Sometimes it is useful to pass more complex objects to a problem function. for example vectors of varying length, for example a selection of species or individuals. The package seems to deal well with this until the parameters are retrieved using getJobPars, see the example below.
this fails with:
Some more info: