- update for compatibility with units package
- Some changes to arguments in
prep_polygons()
- Removed a bunch of unneccessary dependencies
- documentation fixes
- Happy New Year, have an API change. Took 'dsmartr_' out of all function names because Twitter Said
- Added @importFroms to data.R so sf/sp/raster don't need to be libraried
- switched to custom function 'strict_cfp' for returning cell numbers that intersect polygons - better performance, plus old way has some obscure bugs with particular geometries
- Covariate samples now write to GPKG as slow write issue has been resolved (see sf issue #470)
- all internal functions separated from wrappers, enabling unit testing
- Core functions all have unit tests
- prediction_masks function corrected
- eval_npred and eval_nxpred functions combined
- Documentation updated
- Regenerated demo data with some tidying up, particularly soil map geometry
- simplified and debugged
dsmartr_class_maps
- fixed
dir.create
params for nested paths
- more robust version of n_things (internal)
- used n_things where it should be used in
dsmartr_iterate
- fixed parameter passing in
dsmartr_check_polygons
- removed unused param in
dsmartr_prep_polygons
- enabled unit testing, started adding tests
- Added function
dsmartr_pred_mask
, which creates masking rasters for areas where predictions maybe shouldn't be made, on a per-iteration basis. - Added a NEWS file, like I should have done already.
- For
dsmartr_unstack
, flattened the list structure of the output because nested lists are super annoying. Also tweaked the output folder name for term consistency. Naming things is hard.
- For
dsmartr_prepare
, added an option to set a ceiling for area_proportional sampling. This may prevent oversampling very large polygons that have been given an unrealistically simple composition. - Updated the vignette with a lot more detail about what
dsmartr_collate
does.
- Modified function
dsmartr_collate
to pick a random soil where a tie for n-most-likely exists. Previously, ties were output in (essentially) alphabetical order, which is stupid. - Added function
dsmartr_eval_ties
, which maps out pixels where more than one soil type is tied for most-likely.
- documentation fixes
- Added start/stop messaging for all functions, and progress bars wherever possible
dsmartr_iterate
now writes only the points that were actually used in the model wherewrite_samples = TRUE
, instead of all the points that were generated byiter_sample_poly
- For
dsmartr_collate
, a better approach to environment assignments for clustered processing - Updated vignette
- We Do Not Speak Of v. 0.0.0.9004.
- for
dsmartr_iterate
, split out some code into separate internal functions. One,dsmartr_get_classes
makes sure that soil classes are assigned consistent values in all output rasters, including cases where known sites are used, and those known sites are of soil classes that have not been mapped. The second,iter_sample_poly
subsamples the output ofdsmartr_prep_*
on each model iteration. Separating the function makes it easier to modify and test. - Added vignette
- Whoops, didn't quite catch all the factor shenanigans the first time... more bugfixes
- If you rely on
options(stringsAsFactors = FALSE)
to make your day-to-day munging scripts work, you're going to have a bad time turning them into a package... bugfixes - added my own demo data (higher res, has a coastline and therefore nodata areas for more robust testing)
- Cloned existing package, merged in changes from my working .rmd file, learned a lot about how not to write package functions