Hello,
I don't know if you want something like this:
hc_long <- reshape::melt(hc, id.vars = "Cluster") # convert to long format
library(ggplot2)
ggplot(hc_long, aes(x = Cluster, y = value, colour = variable)) +
geom_point() +
geom_line() +
coord_flip() +
facet_wrap(~ variable)
#Data
R Help Forum
I have output from hierarchal clustering and want to plot the results using
the ggplot2 function. Where I have a scatter plot with 5 lines representing
the 5 clusters. I assuming I need to transform the data into three columns
(like) cluster, variable, and value. Not an issue but was
2 matches
Mail list logo