i get an idea:

cldatx1 <- subset(cldat,select=c(ID,A,B,C))
cldatx2 <- subset(cldat,select=c(A,B,C))

The id didn't cause na.omit , so 
both have same obs.

cl1 <- clara(cldatx2,4)
cluster <- cl1$clustering
match1 <- cbind(cldatx1,cluster)
resultdata <- merge(cldat,macth1,by.x="ID",by.y="ID",all.x=T)

Sure there is an easier way???
Thanks,Christian



Am Samstag, 28. Februar 2004 14:07 schrieb Christian Schulz:
> Hi,
>
> i want a cluster-analysis with clara, but getting an
> error because in cldat are NA's.
>
> Error in clara(cldat[, 1:3], 4) : Each of the random samples contains
> objects between which
>  no distance can be computed.
>
> cldatx <- subset(cldat,select=c(A,B,C))
> cldaty <-  na.omit(cldatx)
>
> Now , clara works but cldat has ~193.000 obs
> and cldatx without NA's ~75.000 obs.
>
> How could i match back the clara result (cluster group)
> to check associations with other attributes in the 193.000 obs
> in the cldat.frame ?
>
>
> Many thanks
> Christian

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to