Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rpart_labels

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


Description

This code is modified from the original plot.rpart in package rpart.

Usage

rpart_labels(x)

Arguments

model

object of class "rpart", e.g. the output of rpart()

...

ignored

Value

a list with two elements: $labels and $leaf_labels

Author(s)

Original author Brian Ripley

See Also

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

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


ggdendro

Create Dendrograms and Tree Diagrams Using 'ggplot2'

v0.1.22
GPL-2 | GPL-3
Authors
Andrie de Vries [aut, cre], Brian D. Ripley [aut] (author of package tree)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.