Extract labels data frame from rpart object for plotting using ggplot.
This code is modified from the original plot.rpart in package rpart.
rpart_labels(x)
a list with two elements: leaf_labels
ggdendrogram()
Other dendro_data methods: dendro_data()
, dendro_data.rpart()
, dendro_data.tree()
, dendrogram_data()
Other rpart functions: dendro_data.rpart()
, rpart_segments()
Original author Brian Ripley