DrylandEcology / rSFSW2

rSFSW2: A R package to create soil water balance simulation experiment
GNU General Public License v3.0
8 stars 7 forks source link

'update_actions' function fails when wipe_dbOutput == FALSE #320

Closed CaitlinA closed 6 years ago

CaitlinA commented 6 years ago

When wipe_dbOutput= FALSE the function update_actions fails with this error message:

Error in sum(actions) : invalid 'type' (list) of argument

Perhaps length(actions) would do the trick?

dschlaep commented 6 years ago

@CaitlinA I cannot reproduce this. The default setting is wipe_dbOutput = FALSE and the function update_actions is called by the demo code SFSW2_project_code.R, i.e., it gets run by the unit test project TestPrj4/. Could it be that you don't have the correct version installed?

dschlaep commented 6 years ago

i.e., if you run in parallel, then each worker must have the correct version -- which is not possible with devtools::load_all(). If you run in parallel, then you need to have a properly installed one with R CMD install .

dschlaep commented 6 years ago

ok, but I can change to sum(unlist(actions)) which should do what you request anyhow!

CaitlinA commented 6 years ago

Thanks Daniel!