> Hi there,
>
>
>
> I use function "kmeans" and "clara" to cluster one flow
> cytometry dataset. By using function "plot", the clusters got
> from "clara" can be graphed, while "kmeans" not. How
can I
> get the plot of the clusters of "kmeans"?
library(cluster)
data(xclara)
a1 <- clara(xclara, 3)
a2 <- kmeans(xclara, 3)
class(a1)
class(a2)
help(partition.object)
You need the same components for your object as a partition.object (and
the same class).
I think this can be done, but it is a little bit of work.
>
>
>
> And, I hope to compare the two methods "kmeans" and
"clara",
> or in other word, I want to validate the clustering methods.
> Which function in R could work on the validation?
library(fpc)
?cluster.stats
Best,
Matthias
>
>
>
> Thanks a lot!
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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
>