Re: [R] KMEANS output...

From: Huntsinger, Reid <reid_huntsinger_at_merck.com>
Date: Wed 15 Jun 2005 - 02:48:00 EST


help(kmeans) describes the return value: a list with a) the complete classification b) the cluster centers c) the within-cluster sums of squares b) the cluster sizes. Thankfully, you don't need any parsing.

Reid Huntsinger

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Omer Bakkalbasi Sent: Tuesday, June 14, 2005 12:40 PM
To: r-help@stat.math.ethz.ch
Subject: [R] KMEANS output...

Using R 2.1.0 on Windows

2 questions:
1. Is there a way to parse the output from kmeans within R? 2. If the answer to 1. is convoluted or impossible, how do you save the output from kmeans in a plain text file for further processing outside R?  

Example:
> ktx<-kmeans(x,12, nstart = 200)
I would like to parse ktx within R to extract cluster sizes, sum-of-squares values, etc., OR save ktx in a plain text file in Windows to post-process it with a parser I would have to write.

Thanks!

Omer
Cell: (914) 671-7447



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

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 Wed Jun 15 02:57:39 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:36 EST