Currently, the engine is validated in "R/properties.R" with this code:
engine_type <- new_property( class = class_character, validator = function(value) { if (!(value %in% c("TDA", "ripserr"))) { "must be TDAorripserr." } }, default = "TDA" )
If the user provides an invalid engine name, or specifies an engine that is incompatible with the requested filtration, the package currently stops with an error.
Possible Improvements
I'm interested in feedback on which method(s) would be best out of these:
- Keep the current behavior and improve the error message to be more descriptive
- Automatically correct obvious mistakes (e.g. fix "tda" to be "TDA")
- Automatically switch to the compatible engine if an incompatible engine is chosen, while issuing a warning
Currently, the engine is validated in "R/properties.R" with this code:
engine_type <- new_property( class = class_character, validator = function(value) { if (!(value %in% c("TDA", "ripserr"))) { "must beTDAorripserr." } }, default = "TDA" )If the user provides an invalid engine name, or specifies an engine that is incompatible with the requested filtration, the package currently stops with an error.
Possible Improvements
I'm interested in feedback on which method(s) would be best out of these: