demo/idendroRowCol.R

## Demo on clustering both rows and columns of a data set.
##

library(idendr0) # idendro

data(iris)

# Find similar variables (i.e. features measured on the Iris flowers:
# sepal/petal widths/lengths) ...
hx <- hclust(dist(t(scale(iris[, 1:4]))))
# ... and display the similarities in a dendrogram.
idendro(hx, t(iris[, 1:4]), heatmapRelSize=.7, doScaleHeatmapByRows=TRUE, mai=par('mai')*c(1,1,1,2))
# (Petal width and length being most similar.)

Try the idendr0 package in your browser

Any scripts or data that you put into this service are public.

idendr0 documentation built on May 2, 2019, 5:13 a.m.