I was looking into the calc_worker auxiliary function while developing the new calculate_edgar function, and it is failing to handle a from spatRaster where there is more than one variable contained in the layer names. This seems to stem from line 508 where the merging is done by rbind, since different variables will not have a match in column names.
I also tested functionality with multiple levels and multiple times, and found no problems there, just on multiple variables.
Potential solutions to this are:
- Edit the binding to allow for the possibility of multiple variable names within the same input SpatRaster
- Warn the user that the function only accepts a single variable name per raster. So far this is the mode the function has been used in
beethoven because we usually branch the process and calculate steps by variable, so we had not encountered this problem previously.
What do you think would be best, @mitchellmanware, @sigmafelix? I can make any necessary changes once we agree on a solution. Thanks!
I was looking into the
calc_workerauxiliary function while developing the newcalculate_edgarfunction, and it is failing to handle afromspatRaster where there is more than one variable contained in the layer names. This seems to stem from line 508 where the merging is done byrbind, since different variables will not have a match in column names.I also tested functionality with multiple levels and multiple times, and found no problems there, just on multiple variables.
Potential solutions to this are:
beethovenbecause we usually branch theprocessandcalculatesteps by variable, so we had not encountered this problem previously.What do you think would be best, @mitchellmanware, @sigmafelix? I can make any necessary changes once we agree on a solution. Thanks!