ParamHelpers icon indicating copy to clipboard operation
ParamHelpers copied to clipboard

let trafo also take a scales::trans object

Open jakob-r opened this issue 10 years ago • 0 comments

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?

jakob-r avatar Jul 28 '15 15:07 jakob-r