ParamHelpers
ParamHelpers copied to clipboard
let trafo also take a scales::trans object
I stumbled across the scales package. Although it is focused mainly on plotting it might be useful to use it in ParamHelpers like that:
squared = scales::trans_new(name = "squared", transform = function(x) 2^x, inverse = "log2")
makeNumericParam("cost", -15, 15, trafo = squared)
Advantages:
- we can provide inverse function
- we have a name for the transofrmation
- ggplot2 eco system might be usefull for later plots
What are your thoughts? Unnecessary overhead?