Running 'test-01Metrics.R' [170s]
  Running 'test-02binmat.R' [5s]
  Comparing 'test-02binmat.Rout' to 'test-02binmat.Rout.save' ... OK
  Running 'test-03thresh.R' [31s]
  Comparing 'test-03thresh.Rout' to 'test-03thresh.Rout.save' ... OK
  Running 'test-04vis.R' [48s]
  Comparing 'test-04vis.Rout' to 'test-04vis.Rout.save' ... OK
  Running 'test-05recolor.R' [180s]
  Running 'test-06names.R' [164s]
Running the tests in 'tests/test-01Metrics.R' failed.
Complete output:
  > library("Mercator")
  Loading required package: Thresher
  Loading required package: ClassDiscovery
  Loading required package: cluster
  Loading required package: oompaBase
  Loading required package: PCDimension
  > data("CML500")
  > temp <- removeDuplicateFeatures(CML500)
  > ### need a plain old binary matrix
  > working <- temp@binmat
  > dim(working)
  [1] 770 470
  > N <- dim(working)[2]
  > 
  > jacc <- binaryDistance(working, "jaccard")
  > all(dim(as.matrix(jacc)) == c(N, N))
  [1] TRUE
  > plot(hclust(jacc, "ward.D2"))
  > 
  > canb <- binaryDistance(working, "canberra")
  > all(dim(as.matrix(canb)) == c(N, N))
  [1] TRUE
  > plot(hclust(canb, "ward.D2"))
  > 
  > X <- binaryDistance(working, "sokal")
  > all(dim(as.matrix(X)) == c(N, N))
  [1] TRUE
  > plot(hclust(X, "ward.D2"))
  > 
  > X <- binaryDistance(working, "hamming")
  > all(dim(as.matrix(X)) == c(N, N))
  [1] TRUE
  > plot(hclust(X, "ward.D2"))
  > 
  > X <- binaryDistance(working, "russell")
  > all(dim(as.matrix(X)) == c(N, N))
  [1] TRUE
  > plot(hclust(X, "ward.D2"))
  > 
  > X <- binaryDistance(working, "goodman")
  > all(dim(as.matrix(X)) == c(N, N))
  [1] TRUE
  > plot(hclust(X, "ward.D2"))
  > 
  > X <- binaryDistance(working, "manhattan")
  > all(dim(as.matrix(X)) == c(N, N))
  [1] TRUE
  > plot(hclust(X, "ward.D2"))
  > 
  > X <- binaryDistance(working, "binary")
  > all(dim(as.matrix(X)) == c(N, N))
  [1] TRUE
  > plot(hclust(X, "ward.D2"))
  > 
  > X <- binaryDistance(working, "euclid")
  > all(dim(as.matrix(X)) == c(N, N))
  [1] TRUE
  > plot(hclust(X, "ward.D2"))
  > 
  > 
  > proc.time()
     user  system elapsed 
     8.25    0.54    8.87 
Running the tests in 'tests/test-05recolor.R' failed.
Complete output:
  > library("Mercator")
  Loading required package: Thresher
  Loading required package: ClassDiscovery
  Loading required package: cluster
  Loading required package: oompaBase
  Loading required package: PCDimension
  > data("CML500")
  > 
  > # remove extra identical feature vectors
  > CML500 <- removeDuplicateFeatures(CML500)
  > # jacc, pear, manh, euc
  > vis1 <- Mercator(CML500, "jacc", "mds", K=8)
  > vis2 <- Mercator(CML500, "sokal", "mds", K=8)
  > vis3 <- remapColors(vis1, vis2)
  > 
  > # par(mfrow=c(1,3),  cex=1.5)
  > plot(vis1)
  > plot(vis2)
  > plot(vis3)
  > 
  > A <- getClusters(vis2)
  > B <- getClusters(vis3)
  > table(A, B)
     B
  A     1   2   3   4   5   6   7   8
    1  81   0   0   0   0   0   0   0
    2   0 352   0   0   0   0   0   0
    3   0   0  17   0   0   0   0   0
    4   0   0   0   1   0   0   0   0
    5   0   0   0   0   0  16   0   0
    6   0   0   0   0   1   0   0   0
    7   0   0   0   0   0   0   1   0
    8   0   0   0   0   0   0   0   1
  > X <- getClusters(vis1)
  > table(A, X)
     X
  A     1   2   3   4   5   6   7   8
    1  75   0   0   5   0   1   0   0
    2   4 185   1 108  30   0  12  12
    3   0   0  17   0   0   0   0   0
    4   0   0   0   0   0   1   0   0
    5   0   0   0   0   0  16   0   0
    6   0   0   0   0   0   1   0   0
    7   0   0   1   0   0   0   0   0
    8   0   0   0   0   0   1   0   0
  > table(B, X)
     X
  B     1   2   3   4   5   6   7   8
    1  75   0   0   5   0   1   0   0
    2   4 185   1 108  30   0  12  12
    3   0   0  17   0   0   0   0   0
    4   0   0   0   0   0   1   0   0
    5   0   0   0   0   0   1   0   0
    6   0   0   0   0   0  16   0   0
    7   0   0   1   0   0   0   0   0
    8   0   0   0   0   0   1   0   0
  > 
  > library(cluster)
  > clus <- pam(vis1@distance, k = 12, diss=TRUE, cluster.only=TRUE)
  > vis4 <- setClusters(vis1, clus)
  > plot(vis4)
  > 
  > slot(vis4, "palette") <- c("red", "green", "blue",
  +                            "cyan", "purple", "black")
  > table(Mercator:::symv(vis4))
  
   15  16 
   96 374 
  > 
  > proc.time()
     user  system elapsed 
     5.82    0.50    6.36 
Running the tests in 'tests/test-06names.R' failed.
Complete output:
  > 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 
     3.67    0.54    4.20