0

I have done the clustering using Rattle and at the end I have the following format of data: enter image description here

I need to draw the boxplot for each cluster in the same diagram. (i.e there are 5 clusters. So, in X axis, I need 1 to 5 cluster numbers and in Y axis I need age.)

I did the following things. But I couldn't get as I expect. enter image description here enter image description here enter image description here

Can anybody suggest correct settings to get 5 box plots in parallel for each cluster?

Nadaraj
  • 509
  • 1
  • 7
  • 14
  • 1
    I don't know about Rattle, but in the console you can use a formula like this: `foo <- data.frame(Age=rnorm(100),Cluster=sample(LETTERS[1:5],100,replace=TRUE))`, then the boxplot: `boxplot(Age~Cluster,foo)` – Stephan Kolassa Mar 31 '14 at 05:12
  • I have found the reason. The cluster variable should be in the format of "Category" – Nadaraj Mar 31 '14 at 13:51

1 Answers1

0

In R u can make it. first read the file in frame. reviews <- read.csv ("abc.csv", stringsAsFactors=FALSE)

boxplot(reviews$age ~ reviews$Cluster)

Shashi
  • 1