Running 'test02-colors.R' [155s]
  Running 'testMatrixOps.R' [165s]
Running the tests in 'tests/test02-colors.R' failed.
Complete output:
  > # colors-test.ssc
  > library(oompaBase)
  > 
  > xc <- new("ColorCoding")
  > xc
  An object of class "ColorCoding"
  Slot "v":
  [1] TRUE
  
  Slot "color":
  [1] "red"
  
  Slot "mark":
  [1] 16
  
  > 
  > xc <- new("ColorCoding", v=TRUE, mark=17)
  > xc
  An object of class "ColorCoding"
  Slot "v":
  [1] TRUE
  
  Slot "color":
  [1] "red"
  
  Slot "mark":
  [1] 17
  
  > 
  > theta <- (0:360)*pi/180
  > x <- cos(theta)
  > y <- sin(theta)
  > xp <- x > 0
  > yp <- y > 0
  > colors <- list(ColorCoding(xp&yp, oompaColor$BORING),
  +                ColorCoding(xp&!yp, oompaColor$TOP.TEN),
  +                ColorCoding(!xp&yp, oompaColor$BOTTOM.TEN),
  +                ColorCoding(!xp&!yp, oompaColor$CONFIDENCE.CURVE))
  > plot(ColorCodedPair(x, y, colors))
  > 
  > plot(ColorCodedPair(theta, x, colors))
  > 
  > plot(ColorCodedPair(theta, y, colors),
  +      xlab='angle in radians', ylab='sine', main='colored sine')
  > 
  > fac <- factor(rep(c('left', 'right'), c(180, 181)))
  > colors <- colorCode(fac, c('blue', 'red'))
  > plot(ColorCodedPair(x, y, colors))
  > 
  > # cleanup
  > rm(x, y, xp, yp, theta, colors, fac)
  > 
  > plot(c(1,4), c(1,4), type='n')
  > for (i in 1:4) {
  +   for (j in 1:4) {
  +     points(i,j, col=oompaColor[[i + 4*(j-1)]], pch=16, cex=4)
  +   }
  + }
  > rm(i, j)
  > 
  > proc.time()
     user  system elapsed 
     0.37    0.15    0.46 
Running the tests in 'tests/testMatrixOps.R' failed.
Complete output:
  > library(oompaBase)
  > # a key point is to test the matrixPairedT code
  > # we create a simple example
  > suppressWarnings( RNGversion("3.5.3") )
  > set.seed(372284)
  > nPairs <- 3
  > nGenes <- 7
  > m <- matrix(rnorm(2*nPairs*nGenes), ncol=2*nPairs)
  > v <- factor(rep(c("A","B"), each=nPairs))
  > pf <- rep(1:nPairs, 2)
  > colnames(m) <- paste(as.character(v), pf, sep='')
  > round(m, 2)
          A1    A2    A3    B1    B2    B3
  [1,] -0.08 -1.18  0.75 -1.71  0.02  0.45
  [2,] -0.86 -0.62  2.65  1.79 -0.40 -2.04
  [3,] -1.74  2.21 -0.55 -0.21 -0.15  0.45
  [4,]  0.03  0.24 -1.25  0.24 -0.28 -0.42
  [5,] -1.63 -0.22  1.35  0.06  0.18 -1.35
  [6,]  1.04 -1.94 -0.72 -0.36  1.03 -1.70
  [7,]  0.36  0.73  0.70  3.91  0.29 -1.00
  > # Now we run the package code
  > mpt <- matrixPairedT(m, v, pf)
  > # We also loop over the standard t.test function
  > # for each gene
  > realt <- sapply(1:nGenes, function(i) {
  +   x <- m[i, v=="A"]
  +   y <- m[i, v=="B"]
  +   t1 <- t.test(y, x, paired=TRUE)
  +   t1$statistic
  + })
  > # The differences should all be less than 1e-15
  > all(round(mpt-realt, 15) == 0)
  [1] TRUE
  > 
  > # for completeness, we also check the unpaired result
  > 
  > mtt <- matrixT(m, v)
  > realt <- sapply(1:nGenes, function(i) {
  +   x <- m[i, v=="A"]
  +   y <- m[i, v=="B"]
  +   t1 <- t.test(x, y, paired=FALSE, var.equal=TRUE)
  +   t1$statistic
  + })
  > # The differences should all be less than 1e-15
  > all(round(mtt-realt, 15) == 0)
  [1] TRUE
  > 
  > # and the unequal variance case
  > mut <- matrixUnequalT(m,v)
  > realt <- sapply(1:nGenes, function(i) {
  +   x <- m[i, v=="A"]
  +   y <- m[i, v=="B"]
  +   t1 <- t.test(x, y, paired=FALSE, var.equal=FALSE)
  +   t1$statistic
  + })
  > # The differences should all be less than 1e-15
  > all(round(mut$tt-realt, 15) == 0)
  [1] TRUE
  > 
  > proc.time()
     user  system elapsed 
     0.23    0.09    0.31