Hi,

Thanks Sarah. Unfortunately I did not get a step further.

My question, perhaps a bit clearer, is how to display the case control status 
(or any other arbitrary point label) after clustering in a plot:

With a bit of pseudo code, where dataset is a data.frame, parameters are those 
column names where we find numerical values (no NAs) and nclasses is the 
desired number of classes.

fit <- kmeans(dataset[, parameters], nclasses)
plot(dataset[, parameters], col = fit$cluster, dimen = nclasses)

This gives us a nicely coloured plot where all points are circled. Yet, my 
desire is to see the case / control-Status encoded in a column "Status" with 
single characters, in place of those circled points.

Any hints? I did not get pch() nor text() to work. Perhaps the solution lies 
there, but them I am sure that I do not see the wood for all those trees ...

TIA
Christian

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to