[R] Labels in ICLUST

William Revelle lists at revelle.net
Wed Oct 12 16:37:17 CEST 2011


On Oct 11, 2011, at 2:28 AM, Steve Powell wrote:

> Dear all,
> I can't get the labels slot in ICLUST to accept a character vector.
> library(psych)
> test.data <- Harman74.cor$cov
> ic.out <- ICLUST(test.data,nclusters
> =4,labels=letters[1:ncol(test.data)]) ## Error in !labels : invalid
> argument type
> ic.out <- ICLUST(test.data,nclusters =4,labels=1:ncol(test.data)) ## OK
> 
> Any ideas?
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 


Steve,
That is a bug in ICLUST.  It is now fixed (as of reading your email) and the updated version should be released this weekend.

In the meantime, a workaround, is to label the columns with the labels you want.

> colnames(test.data ) <- letters[1:ncol(test.data)]
> ic.out <- ICLUST(test.data,4)

Bill



William Revelle		           http://personality-project.org/revelle.html
Professor			           http://personality-project.org
Department of Psychology   http://www.wcas.northwestern.edu/psych/
Northwestern University	   http://www.northwestern.edu/
Use R for psychology             http://personality-project.org/r
It is 6 minutes to midnight	   http://www.thebulletin.org



More information about the R-help mailing list