rpart2tidy: Turns rpart data into tibble

Description Usage Arguments Value

Description

This function is an alternative to rpart.plot and other graphing options for decision trees objects generated by rpart

Usage

1
rpart2tidy(rpart_object, text_size = 4, node_spacing = 0.5)

Arguments

rpart_object

the name of the rpart object

text_size

number, defaults to 4

node_spacing

the vertical distance between nodes for purity and nodes for splits values. Defaults to 0.5

Value

a list of three dataframes (or tibbles)

  1. nodes.tbl has data for the main nodes

  2. linesegments.tbl has the data for connecting lines

  3. YES_NO.tbl has xy coordinates for small yes-no branching nodes


markravina/rpart2tidy documentation built on May 31, 2019, 12:42 a.m.