Not for hclust() since it provides results for all clusters from 1 to n (the number of observations). Adding a point can change the definition of the clusters. You could use cutree() to assign the observations to clusters for a particular number of clusters, but then you must decide what rule to use in assigning your new point to one of those clusters (the method= argument in hclust). A simple solution would be to identify to which of the original points, your new point is closest. Assign the new point to the cluster that point is in. Another would be to use aggregate() to compute the centers of the clusters and assign the new point to the closest center. These two approaches will not necessarily agree with one another.
------------------------------------- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of TJUN KIAT TEO Sent: Tuesday, October 11, 2016 2:57 AM To: r-help@r-project.org Subject: [R] Hclust For the hclust function in R, is there a predict function that would work to tell me which cluster does a new observation belong to? Same question for dbscan and self organizing map Thanks Tjun Kiat Teo [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.