Running '01-label.R' [1s]
  Comparing '01-label.Rout' to '01-label.Rout.save' ... OK
  Running '01-remap.R' [174s]
  Running '02-thresh.R' [175s]
  Running '04-reap.R' [3s]
  Comparing '04-reap.Rout' to '04-reap.Rout.save' ... OK
Running the tests in 'tests/01-remap.R' failed.
Complete output:
  > library(Thresher)
  Loading required package: ClassDiscovery
  Loading required package: cluster
  Loading required package: oompaBase
  Loading required package: PCDimension
  > 
  > # randomly generate data (reproducibly) with labels
  > suppressWarnings( RNGversion("3.5.0") )
  > set.seed(782345)
  > N <- 25
  > fix <- sample(LETTERS[1:3], N, replace=TRUE)
  > vary <- sample(LETTERS[4:6], N, replace=TRUE)
  > 
  > # make nuemeric versions of the same data
  > X <- as.numeric(factor(fix))
  > names(X) <- fix
  > table(X, names(X))
     
  X    A  B  C
    1  8  0  0
    2  0  7  0
    3  0  0 10
  > Y <- as.numeric(factor(vary))
  > names(Y) <- vary
  > table(Y, names(Y))
     
  Y    D  E  F
    1 10  0  0
    2  0  8  0
    3  0  0  7
  > 
  > # check label matching (alphabetically)
  > chTable <- table(fix, vary)
  > chTable
     vary
  fix D E F
    A 1 4 3
    B 1 3 3
    C 8 1 1
  > matchLabels(chTable)
     vary
  fix D E F
    C 8 1 1
    A 1 4 3
    B 1 3 3
  > # final matching should be A <-> E (1 <- 2), B <-> F (2 <- 3), C <-> D (3 <- 1)
  > 
  > # check numerics
  > tab <- table(X, Y)
  > tab
     Y
  X   1 2 3
    1 1 4 3
    2 1 3 3
    3 8 1 1
  > matchLabels(tab)
     Y
  X   1 2 3
    3 8 1 1
    1 1 4 3
    2 1 3 3
  > 
  > # What we really want to is change the arbitrary labels
  > # in the "vary" assignments
  > # First, test the numeric version
  > S <- remap(X, Y)
  > table(Y, S) # map from Y to S is 1->3, 2->1, 3->2, as it shoul be
     S
  Y    1  2  3
    1  0  0 10
    2  8  0  0
    3  0  7  0
  > table(X, S)
     S
  X   1 2 3
    1 4 3 1
    2 3 3 1
    3 1 1 8
  > 
  > # Next the character/factor version
  > R <- remap(fix, vary)
  > table(vary, R) # maps D->F, E->D, F->E
      R
  vary  D  E  F
     D  0  0 10
     E  8  0  0
     F  0  7  0
  > table(fix, R) # better diagnal than the original, shown next
     R
  fix D E F
    A 4 3 1
    B 3 3 1
    C 1 1 8
  > table(fix, vary)
     vary
  fix D E F
    A 1 4 3
    B 1 3 3
    C 8 1 1
  > 
  > proc.time()
     user  system elapsed 
     1.25    0.14    1.71 
Running the tests in 'tests/02-thresh.R' failed.
Complete output:
  > 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.75    0.17    1.90