This function plots a regression tree using the rpart.plot package
1 2 3 4 5 6 7 | plot_tree(i_tree, TITLE = "Regression Tree", VARLEN = 0, FACLEN = 0,
UNIFORM = TRUE, COMPRESS = TRUE, COL = "black", SPACE = 1,
YSPACE = SPACE, GAP = NULL, FALLEN.LEAVES = TRUE, SHADOW.OFFSET = 0.4,
BRANCH = if (FALLEN.LEAVES) 1 else 0.2, BRANCH.TYPE = 0, BRANCH.COL = if
(identical(BRANCH.TYPE, 0)) 1 else "gray", CEX = NULL, TWEAK = 1,
YESNO = FALSE, LEGEND.X = NULL, LEGEND.Y = NULL, LEGEND.NCOL = 1,
LEGEND.CEX = 1, TRACE = FALSE, FILENAME = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.