tests/test-04vis.R

library("BinaryMatrix")
data("CML500")

# Jaccard
vis1 <- DistanceVis(CML500, "jacc", "mds", K=20)
head(vis1@symv) # make sure names propagate correctly
head(vis1@colv)
plot(vis1@view[[1]], col=vis1@colv, pch=vis1@symv)

vis1 <- addVisualization(vis1, "tsne", perplexity=30)
plot(vis1@view[[2]]$Y, col=vis1@colv, pch=vis1@symv)

vis1 <- addVisualization(vis1, "hclust")
plot(vis1@view[[3]])

# now test the igraph part
vis1 <- addVisualization(vis1, "graph")
G <- vis1@view[["graph"]]
plot(G$graph, layout=G$layouts[["nicely"]])
plot(G$graph, layout=G$layouts[["mds"]])
plot(G$graph, layout=G$layouts[["tsne"]])

Try the BinaryMatrix package in your browser

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

BinaryMatrix documentation built on May 2, 2019, 4:34 p.m.