cluster3 {ClassDiscovery} | R Documentation |
Cluster a Dataset Three Ways
Description
Produces and plots dendrograms using three similarity measures: Euclidean distance, Pearson correlation, and Manhattan distance on dichotomized data.
Usage
cluster3(data, eps=logb(1, 2), name="", labels=dimnames(data)[[2]])
Arguments
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. |
Value
Invisibly returns the data
object on which it was invoked.
Author(s)
Kevin R. Coombes krc@silicovore.com
See Also
Examples
## 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))
[Package ClassDiscovery version 3.4.5 Index]