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
  • 1,375
  • 2
  • 15
  • 32
Lisann
  • 5,385
  • 12
  • 38
  • 49

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
  • 104,352
  • 13
  • 194
  • 196