Skip to content
Prev 66949 / 398506 Next

Using kmeans given cluster centroids and data with NAs

Hello Tom,

Thanks for the reply.

Unfortunately I do have many NAs in my data as not all vertical
temperature profiles penetrated to the same depth level. In fact if I
simply use na.omit my data matrix is reduced from 4977 to 480
observations, so such a simple solution is not very helpful I'm afraid.
Any other ideas? 

Cheers,
SB

-----Original Message-----
From: Mulholland, Tom [mailto:Tom.Mulholland at dpi.wa.gov.au] 
Sent: Thursday, 31 March 2005 2:15 PM
To: Bestley, Sophie (Marine, Hobart); r-help at stat.math.ethz.ch
Subject: RE: [R] Using kmeans given cluster centroids and data with NAs


Does ?na.omit help

x <- kmeans(na.omit(data),centres)

of course if you have too many NAs you need to be sure that their
removal does not unduly influence the results.

Although I am a bit confused as I thought that agnes did not allow NAs.
I assume that you are running an alternative clustering method using the
results of the first process as the starting point for the partitioning
process and are thus using the same initial data.

Tom