Auto: predict to multiple grids?
Now built.
- Load samples & multiple grids files into environment
- Set WD for grids1 e.g. autumn
- Run BRT normally with samples & grids1
- setWD for grids2 e.g. spring
- Run BRT with loadgbm = "../autumn/SpeciesName/"
- Repeat 4 & 5 for other folders
Should I instead have users load the model object with load() then just specify the name? No cos it'll get loaded in as Bin_Best_Model_Object and so they can only load 1 bin 1 gaus into the environment at any 1 time.
Could instead have option to include multiple grids objects. grids = gridsspring length(grids) = 1 grids = c(gridsspring, gridsautumn) length(grids) = 2 if(length(grids) > 1) {}
Make the prediction section a subfunction or something so it can be respawned within the code? Label the outputs with a suffix e.g. based on name e.g. PredAbundMap_F.Atlantic.stingray_gridsspring.png
- Run gbm.auto as normal for first grids.
- Setwd to next grids folder
- Run second gbm.auto with loadgbm pointed to first gbm.auto run folder. L876 loadgbm inserted. Does all predicting & mapping, saving outputs in current wd's samples[i] subdirectory.
Could as well allow multiple grids entries, so when gbm.auto gets to the predict stage, if there are >1 grids objects, it loops through them. Likely a ballache....