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("Mercator") Loading required package: Thresher Loading required package: ClassDiscovery Loading required package: cluster Loading required package: oompaBase Loading required package: PCDimension > data("CML500") > > ## Jaccard > vis1 <- Mercator(CML500, "jacc", "mds", K=20) > head(Mercator:::symv(vis1)) # make sure names propagate correctly S3.2.0 S4.1.0 S35.1.0 S49.1.0 S57.1.0 S59.1.0 16 16 16 16 16 16 > head(Mercator:::colv(vis1)) S3.2.0 S4.1.0 S35.1.0 S49.1.0 S57.1.0 S59.1.0 "#2E91E5" "#E15F99" "#1CA71C" "#FB0D0D" "#E15F99" "#E15F99" > head(vis1@clusters) S3.2.0 S4.1.0 S35.1.0 S49.1.0 S57.1.0 S59.1.0 1 2 3 4 2 2 > plot(vis1, main = "MDS") # default MDS view > > barplot(vis1) > scatter(vis1, view = "mds", main = "MDS") > > ## t-SNE > vis1 <- addVisualization(vis1, "tsne", perplexity=30) > plot(vis1, view = "tsne", main = "t-SNE") > > scatter(vis1, view = "tsne", colramp = grDevices::terrain.colors, main = "t-SNE") > > ## hclust > vis1 <- addVisualization(vis1, "hclust") > plot(vis1, view = "hclust") > > ## now test the igraph part > vis1 <- addVisualization(vis1, "graph") > plot(vis1, view = "graph") # default layout > plot(vis1, view = "graph", layout = "nicely") # default layout > plot(vis1, view = "graph", layout = "mds") > plot(vis1, view = "graph", layout = "tsne") > > ## umap > vis1 <- addVisualization(vis1, "umap") > plot(vis1, view = "umap", main="UMAP") > > scatter(vis1, view = "umap", main="UMAP") > > ## som > vis1 <- addVisualization(vis1, "som") > plot(vis1, view = "som") > plot(vis1, view = "som", type = "counts") > plot(vis1, view="som", type = "dist.neighbours", palette.name = topo.colors) > > proc.time() user system elapsed 18.37 7.76 26.14