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

ggdendro-package

Create Dendrograms and Tree Diagrams using 'ggplot2'


Description

This package enables you to create dendrograms and tree plots using ggplot2::ggplot().

Details

The ggplot2 philosophy is to clearly separate data from the presentation. Unfortunately the plot method for dendrograms (plot.dendrogram()) plots directly to a plot device without exposing the data. The ggdendro package resolves this by making available functions that extract the dendrogram plot data. This data can be used with ggplot.

The function dendro_data() extracts data from different objects that contain dendrogram information. It is a generic function with methods for:

These methods create an object of class dendro, consisting of a list of data frames. To extract the relevant data frames from the list, you can use the accessor functions:

To plot a dendrogram, either construct a plot with ggplot2::ggplot() or use the function ggdendrogram().

Author(s)

Andrie de Vries - apdevries@gmail.com

See Also


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.