Skip to content
Back to formatted view

Raw Message

Message-ID: <422C1DBB.5050806@statistik.uni-dortmund.de>
Date: 2005-03-07T09:24:11Z
From: Uwe Ligges
Subject: cl$cluster of kmeans
In-Reply-To: <200503070914.j279E70P001885@hypatia.math.ethz.ch>

XP Sun wrote:

> 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.


clc <- cl$cluster
save(clc, .....)

Uwe Ligges



> best,
> xp sun
> 
> ______________________________________________
> R-help at 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