0

From spss there is a kind of clustering which is called two step cluster.

The vizual option is provided by spss is something like this left side plot.

Having the results of clusters, label/names of the variables used and their score into a dataframe like this

data.frame(cluster = c(1,1,1,2,2,2,3,3,3), value = c("Google","Amazon","Yahoo","Google","Amazon","Yahoo","Google","Amazon","Yahoo"), score = c(2194.2,43.2,4331.3,31.3,133.1,432.1,3234.1,44.3,21.4))

These are the inputs as refered in the spss plot.

is there any efficient way to vizualize them using ggplot2?

foc
  • 947
  • 1
  • 9
  • 26

1 Answers1

1

Maybe something like this:

library(ggplot2)
#Plot
ggplot(df,aes(x=cluster,y=score,fill=value))+geom_bar(stat='identity',position = 'stack')+
  coord_flip()

enter image description here

Duck
  • 39,058
  • 13
  • 42
  • 84