I have used this code to make horizontal dendogram but somehow the variables name are not showing properly.
structure(list(Location = c("Plastic", "Foamed Plastics", "Paper & Cardboard", "Rubber", "Cloth", "wood", "Glass & Ceramic", "Metal"), Cox.s.Bazar = c(3072L, 463L, 208L, 177L, 59L, 63L, 62L, 28L), Chittagong = c(1372L, 397L, 402L, 60L, 87L, 27L, 28L, 8L), St..Martin.s.Island = c(1121L, 48L, 216L, 54L, 107L, 74L, 18L, 27L), Kuakata = c(544, 37, 65, 12, 34, 0.1, 17, 0.1), Kotka = c(126, 0.1, 12, 0.1, 3, 0.1, 0.1, 0.1)), class = "data.frame", row.names = c("Plastic", "Foamed Plastics", "Paper & Cardboard", "Rubber", "Cloth", "wood", "Glass & Ceramic", "Metal"))
Code I have used
rownames(df) = c(df$Location)
head(df)
data = df[,-1]
head(data)
mydata = scale(data)
head(mydata)
require(stats)
res.dist = dist(x=mydata, method = "euclidean")
hcl = hclust(d=res.dist, method = "complete")
require(graphics)
plot(as.dendrogram(hcl), xlab ="Height", horiz = T)