# NOT RUN {
# Operator precedence and parenthesis
func_pmml <- function_to_pmml("1 + 3/5 - (4 * 2)")
# Nested arbitrary functions
func_pmml <- function_to_pmml("foo(bar(x)) - bar(foo(y-z))")
# If-else expression
func_pmml <- function_to_pmml("if (x==3) { 3 } else { 0 }")
# If-else with boolean output
func_pmml <- function_to_pmml("if (x==3) { TRUE } else { FALSE }")
# Function with string argument types
func_pmml <- function_to_pmml("colors('red','green','blue')")
# Sign in front of expression
func_pmml <- function_to_pmml("-(x/y)")
# }
Run the code above in your browser using DataLab