boolean_converter <- function(x) {
return(if (x == "TRUE") TRUE else if (x == "FALSE") FALSE else x)
}
parameters <- W4MRUtils::convert_parameters(
list("x" = "TRUE"),
c(boolean_converter)
)
print(parameters$`some-parameter`)
## "TRUE" has becomes TRUE.
Run the code above in your browser using DataLab