1

I have a question about Kmeans in R. I have a dataframe like the IRIS data that is available in R. I found a website where they create a kmeans result that i like: enter image description here

My question is, I want to reproduce the figure with my own data (dataframe 100X4) but i can't find how to do that. Can anyone help me with this?

alelom
  • 2,130
  • 3
  • 26
  • 38
Lisann
  • 5,705
  • 14
  • 41
  • 50

1 Answers1

3

This is a parallel coordinates plot. You can use for example the parcoord function from MASS --

library(MASS)
iris$Species = as.numeric(iris$Species)
parcoord(iris, col=iris$Species)
Lars Kotthoff
  • 107,425
  • 16
  • 204
  • 204