| tok_eval | R Documentation |
Evaluates a decision of the model for the given inputs, as tok eval does. In a
model of language 0.7 the decision is evaluated with the decisions, input data and
business knowledge models it requires, and the inputs are the input data by FEEL
name; in earlier models the decision table alone is evaluated with the hit policy of
the table.
tok_eval(x, decision, inputs = list(), lang = getOption("tok.lang", "en"))
x |
A model: a |
decision |
Identifier of the decision. |
inputs |
Named list of inputs: numbers, strings, logical values, |
lang |
Language of the messages, |
In a model of language 0.7 the value of the decision (a number, string,
logical value, list or named list; NULL for null), a list of named lists as a data
frame. In earlier models: for the hit policies unique, first, any and
priority a named list output name → value (NULL when no rule matches); for
collect a data frame with one row per matched rule.
f <- system.file("examples", "propozycja-zakupu.tok", package = "tokr")
tok_eval(f, "tryb-akceptacji", list(rodzaj = "drukowana", cena = 120))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.