cluster3 | R Documentation |
Produces and plots dendrograms using three similarity measures: Euclidean distance, Pearson correlation, and Manhattan distance on dichotomized data.
cluster3(data, eps=logb(1, 2), name="", labels=dimnames(data)[[2]])
data |
A matrix, numeric data.frame, or
|
eps |
A numerical value; the threshold at which to dichotomize the data |
name |
A character string to label the plots |
labels |
A vector of character strings used to label the items in the dendrograms. |
Invisibly returns the data
object on which it was invoked.
Kevin R. Coombes krc@silicovore.com
hclust
## simulate data from two different classes
d1 <- matrix(rnorm(100*30, rnorm(100, 0.5)), nrow=100, ncol=30, byrow=FALSE)
d2 <- matrix(rnorm(100*20, rnorm(100, 0.5)), nrow=100, ncol=20, byrow=FALSE)
dd <- cbind(d1, d2)
## cluster it 3 ways
par(mfrow=c(2,2))
cluster3(dd)
par(mfrow=c(1,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.