View source: R/make.clust.mids.R
make.clust.mids | R Documentation |
blah blah blah
make.clust.mids(C, S)
C |
|
S |
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (C, S)
{
mids <- data.frame(cl = unique(C[, 3]), Xcoord = c(tapply(C[,
1], C$cluster, mean)), Ycoord = c(tapply(C[, 2], C$cluster,
mean)))
plot(S)
points(C[, 1:2], pch = 21, bg = C[, 3], cex = 1.5)
points(mids[, -1], pch = "+", col = mids[, 1], cex = 1.5)
return(mids)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.