[R] Add labels to dendogram

Luigi Marongiu m@rong|u@|u|g| @end|ng |rom gm@||@com
Thu Mar 26 16:10:15 CET 2020


Dear all,
I have built a hierarchical clustering on some data as follows:
```
Tag = c(
  "YP_008603282", "NP_054035",    "BAA00606",     "NP_054034",
 "NP_054033",
  "AAC17846" ,    "NP_054036",    "YP_073767" ,   "BAQ20411",     "P52455")
Healthy = c(
  12.15540751,  2.33103008,  1.46924258,  0.26274009,  0.95217008,
  -0.08197491,  0.09038259, -0.08197491, -0.25433241, -0.08197491)
Tumour = c(
  12.51939026,  1.20983671,  0.61459705,  0.61459705,  0.81301027,
  0.21777061,  -0.17905583, -0.17905583, -0.17905583,  0.01935739)
Metastasis = c(
  12.55328882,  1.04722513,  1.04722513,  0.70881149,  0.37039785,
  0.20119103, 0.20119103,    0.20119103,  0.20119103,  0.03198422)
df = data.frame(Tag, Healthy, Tumour, Metastasis, stringsAsFactors = FALSE)
d <- dist(df, method = "euclidean")
hc1 <- hclust(d, method = "complete" )
plot(hc1)
```

Is there a way to add the Tag column instead of the numbers to the leaves
of the dendrogram?
Thank you

-- 
Best regards,
Luigi

	[[alternative HTML version deleted]]



More information about the R-help mailing list