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(Thresher) Loading required package: ClassDiscovery Loading required package: cluster Loading required package: oompaBase Loading required package: PCDimension > > # unstructured matrix > suppressWarnings( RNGversion("3.5.0") ) > set.seed(9948489) > dumb <- matrix(rnorm(100*12), ncol=12) > colnames(dumb) <- paste("G", 1:12, sep='') > thresh <- Thresher(dumb) > summary(thresh@delta) Min. 1st Qu. Median Mean 3rd Qu. Max. 0.03966 0.19790 0.27636 0.31588 0.38754 0.65888 > screeplot(thresh) > screeplot(thresh) > plot(thresh) > scatter(thresh) > heat(thresh) > > # data matrices with structure > set.seed(250264) > rho <- 0.5 > nProtein <- 16 > splinter <- sample((nProtein/2) + (-3:3), 1) > sigma1 <- matrix(rho, ncol=nProtein, nrow=nProtein) > diag(sigma1) <- 1 > sigma2 <- sigma1 > sigma2[(1+splinter):nProtein, 1:splinter] <- 0 > sigma2[1:splinter, (1+splinter):nProtein] <- 0 > st <- SimThresher(sigma2, nSample=300) > image(st, col=redgreen(64), zlim=c(-1,1)) > screeplot(st, col='pink', lcol='red') > plot(st) > plot(thresh, ij=3:4) > scatter(st) > heat(st) > heat(st, 3) > > > proc.time() user system elapsed 1.10 0.12 1.23