dendro | R Documentation |
Make a dendrogram
dendro(
df,
clust_method = "ave",
dist_method = "euclidean",
labels = NULL,
main = NULL,
sub = NULL,
cex = 0.8
)
df |
(Dataframe or Matrix) The data, arranged in wide format. Non-numeric data
will be coerced into |
clust_method |
(Character) the agglomeration method to be used. This should be (an unambiguous abbreviation of) one of "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC). |
dist_method |
(Character) the distance measure to be used. This must be one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski". Any unambiguous substring can be given. |
labels |
(Character) Text to use as the tip labels. |
main |
(Character) Chart title. |
sub |
(Character) Chart subtitle. |
cex |
(Numeric) Size magnification. |
An object of class hclust
.
## Not run:
df <- data.frame(stringsAsFactors = FALSE,
site = c("a", "b", "c", "d"),
spp1 = c(0L, 1L, 1L, 0L),
spp2 = c(1L, 1L, 1L, 0L),
spp3 = c(0L, 0L, 1L, 0L))
dendro(df[2:4], labels = df$site)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.