Closed
Description
All the print methods follow this pattern
Lines 86 to 95 in af46f57
What about we create a wrapper so we can do
print_helper <- function(name, x, ...) {
cat(name, " Specification (", x$mode, ")\n\n", sep = "")
model_printer(x, ...)
if (!is.null(x$method$fit$args)) {
cat("Model fit template:\n")
print(show_call(x))
}
invisible(x)
}
print.decision_tree <- function(x, ...) {
print_helper("Decision Tree Model", x, ...)
}