[R] cl$cluster of kmeans

From: XP Sun <xpsun_at_ict.ac.cn>
Date: Mon 07 Mar 2005 - 20:14:02 EST


hi, all,

        i had a problem when i used kmeans as follow:

> pp <- scan("m0028.data", quiet= TRUE)
> x <- matrix(pp, nc=3, byrow=TRUE)

> cl<-kmeans(x, 4, 20)

> plot(x, col=cl$cluster)
> save(cl$cluster, file="m0028.ks", ascii=TRUE)

		Error in save(cl$cluster, file = "m0028.ks", ascii = TRUE) : 
  	      Object "cl$cluster" not found

	when i wanted to save the vector of cluster only, a reflection was  thrown out as that. 

	could i save cl$cluster only? how?
	thank you in advance.

best,
xp sun



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Mar 07 20:19:38 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:41 EST