R Under development (unstable) (2024-04-27 r86487 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(ClassDiscovery) Loading required package: cluster Loading required package: oompaBase > suppressWarnings( RNGversion("3.5.3") ) > set.seed(320085) > # 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 the data > hc <- hclust(distanceMatrix(dd, 'pearson'), method='average') > > # make a fake reproducibility matrix > fraud <- function(x) { + new('ClusterTest', result=abs(cor(x)), call=match.call()) + } > > fake <- fraud(dd) > summary(fake) A ClusterTest object. Call: fraud(x = dd) Agreement levels: Min. 1st Qu. Median Mean 3rd Qu. Max. 0.0000367 0.0643374 0.3528907 0.2975618 0.5153581 0.6697706 > > hist(fake) > > image(fake) # let heatmap compute a new dendrogram from the agreements > > image(fake, dendrogram=hc) # use the actual dendrogram from the data > > image(fake, dendrogram=hc, col=blueyellow(64)) # change the colors > > #cleanup > rm(fake, fraud, hc, dd, d1, d2) > > proc.time() user system elapsed 0.35 0.12 0.43