Re: [Rd] Flexclust barchart issue when mcol=NULL

From: Friedrich Leisch <friedrich.leisch_at_stat.uni-muenchen.de>
Date: Wed, 16 Dec 2009 15:55:30 +0100

>>>>> On Wed, 16 Dec 2009 07:05:11 +0100 (CET), >>>>> christopher a hane (cah) wrote:

> Full_Name: Chris Hane
> Version: 2.10.1
> OS: Windows
> Submission from: (NULL) (198.203.181.181)

> When using barchart in the flexcust package, setting mcol=NULL to avoid the
> lollipops causes an error. Each panel shows the text message "Error using
> packet n replacement has length zero." where n is the panel number.

  >> data(iris)
  >> cl <- cclust(iris[,-5], k=3)
  >> barplot(cl, mcol=NULL)  #works fine
  >> barchart(cl, mcol=NULL) # oops

Yes, that's a bug in flexclust. I'll fix it for the next release.

In the meantime you can use barchart(cl, mcol=NA) which has the same effect for me.   

> FWIW, as the data of the clusters is scaled showing the colMeans
> for the centers is misleading. The global mean of each column is
> 0, not the colMean of the centers.

Hmm, I am not sure I understand this paragraph. I agree that showing the global mean makes no sense for centered data, but the iris data are not centered. I don't think that barcharts like the above make sense in all possible situations. I mainly use them for binary data where I want to see which variables have a high/low percentage of ones in which cluster (=bars), and what the difference to the global mean is.

Best,
Fritz



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 16 Dec 2009 - 15:01:03 GMT

This archive was generated by hypermail 2.2.0 : Wed 16 Dec 2009 - 16:41:06 GMT