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 > > ## test names part > set.seed(853845) > X <- matrix(sample(c(0,1), 10*30, replace=TRUE), 10, 30) > B <- BinaryMatrix(X) > > J <- Mercator(B, "jaccard", "mds", 3) > J <- addVisualization(J, "tsne", perplexity=5) > J <- addVisualization(J, "graph") > G <- J@view[["graph"]] > ## There used to be a bug that caused thie next line to fail when row names > ## or column names were NULL. If this works, then we haven't broken it again. > plot(G$graph, layout=G$layouts[["nicely"]]) > plot(J, view = "graph", layout = "nicely") > ## There is an issue in igraph if nodes are placed at (nearly?) identical > ## locations. This was fixed inside the 'plot' method by 'jittering" the > ## locations. > plot(J, view = "graph", layout = "mds") > plot(J, view = "graph", layout = "tsne") > > ## Need to see if we still assume that visualizations exist > J <- Mercator(B, "jaccard", "hclust", 3) > J <- addVisualization(J, "graph") > G <- J@view[["graph"]] > names(G$layouts) [1] "nicely" > > > proc.time() user system elapsed 2.92 0.45 3.36