to_sql_case | R Documentation |
Extract SQL case statement from a rulelist
to_sql_case(rulelist, rhs_column_name = "RHS", output_colname = "output")
rulelist |
A rulelist object |
rhs_column_name |
(string, default: "RHS") Name of the column in the rulelist to be used as RHS (WHEN some_rule THEN rhs) in the sql case statement |
output_colname |
(string, default: "output") Name of the output column created by the SQL statement (used in case ... AS output_column) |
As a side-effect, the SQL statement is cat to stdout. The output contains newline character.
(string invisibly) SQL case statement
rulelist, tidy, augment, predict, convert_rule_flavor
Other Auxiliary Rulelist Utility:
convert_rule_flavor()
model_c5 = C50::C5.0(Attrition ~., data = modeldata::attrition, rules = TRUE)
tidy(model_c5)
to_sql_case(tidy(model_c5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.