View source: R/nested_chclust.R
stat_nested_hclust | R Documentation |
Display a dendrogram as a ggplot2 layer
stat_nested_hclust( mapping = NULL, data = NULL, geom = "segment", position = "identity", ..., inherit.aes = TRUE, show.legend = NA ) StatNestedHclust
mapping |
A mapping created using aes. Must map x OR y to a qualifier. |
data |
A nested_hclust object |
geom |
Any geom that takes x, xend, y, and yend. Probably geom_segment is the only one that makes sense. |
position |
Position adjustment |
... |
Passed to the the stat/geom (see geom_segment) |
inherit.aes |
Inherit aesthetics from ggplot()? |
show.legend |
Show mapped aesthetics in the legend? |
An object of class StatNestedHclust
(inherits from Stat
, ggproto
, gg
) of length 4.
A ggplot2::Stat
library(ggplot2) library(dplyr, warn.conflicts = FALSE) alta_coniss <- nested_data( alta_lake_geochem, qualifiers = c(age, depth, zone), key = param, value = value, trans = scale ) %>% nested_chclust_coniss() ggplot(alta_coniss) + stat_nested_hclust(aes(model = model, y = depth)) + scale_y_reverse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.