# Create a DexiDiscretizeFunction (without association to any attributes or scales)
fnc <- DexiDiscretizeFunction(bounds = c(-1, 2), values = list(1, 3, 5), assoc = c("up", "down"))
# Print fields and basic properties of fnc
fnc$verify()
fnc$nargs()
fnc$nvals()
fnc$to_string()
fnc$bound_assoc(1)
fnc$bound_assoc(2)
# Try some discretizations
sapply(c(-1.1, -1, 0, 1, 2, 3), fnc$evaluate)
Run the code above in your browser using DataLab