rpart_labels function

Extract labels data frame from rpart object for plotting using ggplot.

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)

Returns

a list with two elements: labelsandlabels and leaf_labels

See Also

ggdendrogram()

Other dendro_data methods: dendro_data(), dendro_data.rpart(), dendro_data.tree(), dendrogram_data()

Other rpart functions: dendro_data.rpart(), rpart_segments()

Author(s)

Original author Brian Ripley

  • Maintainer: Andrie de Vries
  • License: GPL-2 | GPL-3
  • Last published: 2024-02-23