Running ‘andersondarling_behaviour.r’ [0s/1s]
  Running ‘andersondarling_correctness.r’ [1s/3s]
  Running ‘andersondarling_errors.r’ [0s/1s]
  Running ‘andersondarling_warnings.r’ [0s/1s]
  Running ‘bartlett_behaviour.r’ [0s/1s]
  Running ‘bartlett_correctness.r’ [4s/6s]
  Running ‘bartlett_errors.r’ [0s/1s]
  Running ‘bartlett_warnings.r’ [0s/1s]
  Running ‘brownforsythe_behaviour.r’ [0s/1s]
  Running ‘brownforsythe_correctness.r’ [11s/18s]
  Running ‘brownforsythe_errors.r’ [0s/1s]
  Running ‘brownforsythe_warnings.r’ [0s/1s]
  Running ‘cor_pearson_behaviour.r’ [0s/1s]
  Running ‘cor_pearson_correctness.r’ [1s/2s]
  Running ‘cor_pearson_errors.r’ [0s/1s]
  Running ‘cor_pearson_warnings.r’ [0s/1s]
  Running ‘cosinor_behaviour.r’ [0s/1s]
  Running ‘cosinor_correctness.r’ [26s/41s]
  Running ‘cosinor_errors.r’ [0s/1s]
  Running ‘cosinor_warnings.r’ [0s/1s]
  Running ‘f_var_behaviour.r’ [0s/1s]
  Running ‘f_var_correctness.r’ [1s/2s]
  Running ‘f_var_errors.r’ [0s/1s]
  Running ‘f_var_warnings.r’ [0s/1s]
  Running ‘flignerkilleen_behaviour.r’ [0s/1s]
  Running ‘flignerkilleen_correctness.r’ [3s/6s]
  Running ‘flignerkilleen_errors.r’ [0s/1s]
  Running ‘flignerkilleen_warnings.r’ [0s/1s]
  Running ‘jarquebera_behaviour.r’ [0s/1s]
  Running ‘jarquebera_correctness.r’ [1s/2s]
  Running ‘jarquebera_errors.r’ [0s/1s]
  Running ‘jarquebera_warnings.r’ [0s/1s]
  Running ‘kolmogorovsmirnov_twosample_behavioiur.r’ [0s/1s]
  Running ‘kolmogorovsmirnov_twosample_correctness.r’ [1s/2s]
  Running ‘kolmogorovsmirnov_twosample_errors.r’ [0s/1s]
  Running ‘kolmogorovsmirnov_twosample_warnings.r’ [0s/1s]
  Running ‘kruskalwallis_behaviour.r’ [0s/1s]
  Running ‘kruskalwallis_correctness.r’ [3s/4s]
  Running ‘kruskalwallis_errors.r’ [0s/1s]
  Running ‘kruskalwallis_warnings.r’ [0s/1s]
  Running ‘levene_behaviour.r’ [0s/1s]
  Running ‘levene_correctness.r’ [10s/17s]
  Running ‘levene_errors.r’ [0s/1s]
  Running ‘levene_warnings.r’ [0s/1s]
  Running ‘oneway_equalvar_behaviour.r’ [0s/1s]
  Running ‘oneway_equalvar_correctness.r’ [6s/10s]
  Running ‘oneway_equalvar_errors.r’ [0s/1s]
  Running ‘oneway_equalvar_warnings.r’ [0s/1s]
  Running ‘oneway_welch_behaviour.r’ [0s/1s]
  Running ‘oneway_welch_correctness.r’ [4s/7s]
  Running ‘oneway_welch_errors.r’ [0s/1s]
  Running ‘oneway_welch_warnings.r’ [0s/1s]
  Running ‘t_equalvar_behaviour.r’ [0s/1s]
  Running ‘t_equalvar_correctness.r’ [1s/3s]
  Running ‘t_equalvar_errors.r’ [0s/1s]
  Running ‘t_equalvar_warnings.r’ [0s/1s]
  Running ‘t_onesample_behaviour.r’ [0s/1s]
  Running ‘t_onesample_correctness.r’ [1s/2s]
  Running ‘t_onesample_errors.r’ [0s/1s]
  Running ‘t_onesample_warnings.r’ [0s/1s]
  Running ‘t_paired_behaviour.r’ [0s/1s]
  Running ‘t_paired_correctness.r’ [1s/2s]
  Running ‘t_paired_errors.r’ [0s/1s]
  Running ‘t_paired_warnings.r’ [0s/1s]
  Running ‘t_welch_behaviour.r’ [0s/1s]
  Running ‘t_welch_correctness.r’ [1s/2s]
  Running ‘t_welch_errors.r’ [0s/1s]
  Running ‘t_welch_warnings.r’ [0s/1s]
  Running ‘waerden_behaviour.r’ [0s/1s]
  Running ‘waerden_correctness.r’ [3s/4s]
  Running ‘waerden_errors.r’ [0s/1s]
  Running ‘waerden_warnings.r’ [0s/1s]
  Running ‘wilcoxon_onesample_behaviour.r’ [0s/1s]
  Running ‘wilcoxon_onesample_correctness.r’ [3s/5s]
  Running ‘wilcoxon_onesample_errors.r’ [0s/1s]
  Running ‘wilcoxon_onesample_warnings.r’ [0s/1s]
  Running ‘wilcoxon_paired_behaviour.r’ [0s/1s]
  Running ‘wilcoxon_paired_correctness.r’ [3s/6s]
  Running ‘wilcoxon_paired_errors.r’ [0s/1s]
  Running ‘wilcoxon_paired_warnings.r’ [0s/1s]
  Running ‘wilcoxon_twosample_behaviour.r’ [0s/1s]
  Running ‘wilcoxon_twosample_correctness.r’ [9s/15s]
  Running ‘wilcoxon_twosample_errors.r’ [0s/1s]
  Running ‘wilcoxon_twosample_warnings.r’ [0s/1s]
Running the tests in ‘tests/kolmogorovsmirnov_twosample_behavioiur.r’ failed.
Complete output:
  > library(matrixTests)
  > 
  > #--- special argument cases ----------------------------------------------------
  > 
  > # x and y can be vectors
  > x <- rnorm(9)
  > y <- rnorm(9)
  > X <- matrix(x, nrow=1)
  > Y <- matrix(y, nrow=1)
  > stopifnot(all.equal(row_kolmogorovsmirnov_twosample(x, y), row_kolmogorovsmirnov_twosample(X, Y)))
  Error in (function (q, sizes, z = NULL, alternative = c("two.sided", "less",  : 
    unused argument (two.sided = dots[[5]][[1]])
  Calls: stopifnot ... all.equal -> row_kolmogorovsmirnov_twosample -> mapply
  Execution halted
Running the tests in ‘tests/kolmogorovsmirnov_twosample_correctness.r’ failed.
Complete output:
  > library(matrixTests)
  > 
  > #--- functions -----------------------------------------------------------------
  > 
  > base_kolmogorovsmirnov_twosample <- function(mat1, mat2, alternative="t", exact=NA) {
  +   if(is.vector(mat1)) mat1 <- matrix(mat1, nrow=1)
  +   if(is.vector(mat2)) mat2 <- matrix(mat2, nrow=1)
  +   if(length(alternative)==1) alternative <- rep(alternative, nrow(mat1))
  +   if(length(exact)==1) exact <- rep(exact, nrow(mat1))
  + 
  +   nx  <- ny <- nxy <- stat <- p <- numeric(nrow(mat1))
  +   al  <- character(nrow(mat1))
  +   ext <- logical(nrow(mat1))
  +   for(i in 1:nrow(mat1)) {
  +     ex  <- if(is.na(exact[i])) NULL else exact[i]
  + 
  +     res <- ks.test(mat1[i,], mat2[i,], alternative=alternative[i], exact=ex)
  + 
  +     nx[i]   <- sum(!is.na(mat1[i,]))
  +     ny[i]   <- sum(!is.na(mat2[i,]))
  +     nxy[i]  <- nx[i] + ny[i]
  +     stat[i] <- res$statistic
  +     p[i]    <- res$p.value
  +     al[i]   <- c(l="less", g="greater", t="two.sided")[alternative[i]]
  +     ext[i]  <- res$exact
  +   }
  + 
  +   data.frame(obs.x=nx, obs.y=ny, obs.tot=nxy, statistic=stat, pvalue=p,
  +              alternative=al, exact=ext, stringsAsFactors=FALSE
  +              )
  + }
  > 
  > 
  > #--- montecarlo ----------------------------------------------------------------
  > 
  > # 25 samples per group (not exceeding exact cutoff)
  > x <- matrix(rnorm(2000), ncol=2)
  > y <- matrix(rnorm(4000), ncol=4)
  > alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
  > ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
  > res1 <- base_kolmogorovsmirnov_twosample(x, y, alts, exact=ext)
  > res2 <- row_kolmogorovsmirnov_twosample(x, y, alts, exact=ext)
  Error in (function (q, sizes, z = NULL, alternative = c("two.sided", "less",  : 
    unused argument (two.sided = dots[[5]][[1]])
  Calls: row_kolmogorovsmirnov_twosample -> mapply
  Execution halted
Running the tests in ‘tests/kolmogorovsmirnov_twosample_warnings.r’ failed.
Complete output:
  > library(matrixTests)
  > source("utils/capture.r")
  > 
  > #--- x has less than 1 observation ---------------------------------------------
  > 
  > wrn <- 'row_kolmogorovsmirnov_twosample: 1 of the rows had less than 1 "x" observation.\nFirst occurrence at row 1'
  > nacolumns <- c("statistic", "pvalue")
  > 
  > # 0 observations
  > res <- capture(row_kolmogorovsmirnov_twosample(numeric(), 1))
  > stopifnot(all.equal(res$warning, wrn))
  > stopifnot(all(is.na(res$value[,nacolumns])))
  > stopifnot(all.equal(res$value$obs.x, 0))
  > stopifnot(all.equal(res$value$obs.tot, 1))
  > 
  > # only NA observations
  > res <- capture(row_kolmogorovsmirnov_twosample(c(NA_integer_, NA_integer_), 1))
  > stopifnot(all.equal(res$warning, wrn))
  > stopifnot(all(is.na(res$value[,nacolumns])))
  > stopifnot(all.equal(res$value$obs.x, 0))
  > stopifnot(all.equal(res$value$obs.tot, 1))
  > 
  > 
  > #--- y has less than 1 observations --------------------------------------------
  > 
  > wrn <- 'row_kolmogorovsmirnov_twosample: 1 of the rows had less than 1 "y" observation.\nFirst occurrence at row 1'
  > nacolumns <- c("statistic", "pvalue")
  > 
  > # 0 observations
  > res <- capture(row_kolmogorovsmirnov_twosample(1, numeric()))
  > stopifnot(all.equal(res$warning, wrn))
  > stopifnot(all(is.na(res$value[,nacolumns])))
  > stopifnot(all.equal(res$value$obs.y, 0))
  > stopifnot(all.equal(res$value$obs.tot, 1))
  > 
  > # only NA observations
  > res <- capture(row_kolmogorovsmirnov_twosample(1, c(NA_integer_, NA_integer_)))
  > stopifnot(all.equal(res$warning, wrn))
  > stopifnot(all(is.na(res$value[,nacolumns])))
  > stopifnot(all.equal(res$value$obs.y, 0))
  > stopifnot(all.equal(res$value$obs.tot, 1))
  > 
  > 
  > #--- both x and y have less than 1 observation ---------------------------------
  > 
  > wrnx <- 'row_kolmogorovsmirnov_twosample: 1 of the rows had less than 1 "x" observation.\nFirst occurrence at row 1'
  > wrny <- 'row_kolmogorovsmirnov_twosample: 1 of the rows had less than 1 "y" observation.\nFirst occurrence at row 1'
  > nacolumns <- c("statistic", "pvalue")
  > 
  > # 0 observations
  > res <- capture(row_kolmogorovsmirnov_twosample(numeric(), numeric()))
  > stopifnot(all.equal(res$warning[1:2], c(wrnx, wrny)))
  > stopifnot(all(is.na(res$value[,nacolumns])))
  > stopifnot(all.equal(res$value$obs.x, 0))
  > stopifnot(all.equal(res$value$obs.y, 0))
  > stopifnot(all.equal(res$value$obs.tot, 0))
  > 
  > # only NA observations
  > res <- capture(row_kolmogorovsmirnov_twosample(c(NA_integer_, NA_integer_), c(NA_integer_, NA_integer_)))
  > stopifnot(all.equal(res$warning[1:2], c(wrnx, wrny)))
  > stopifnot(all(is.na(res$value[,nacolumns])))
  > stopifnot(all.equal(res$value$obs.x, 0))
  > stopifnot(all.equal(res$value$obs.y, 0))
  > stopifnot(all.equal(res$value$obs.tot, 0))
  > 
  > 
  > #--- ties are present ----------------------------------------------------------
  > 
  > wrn <- 'row_kolmogorovsmirnov_twosample: 1 of the rows had ties: asymptotic p-values will be approximate.\nFirst occurrence at row 1'
  > 
  > # warning when exact=TRUE
  > res <- capture(row_kolmogorovsmirnov_twosample(c(3,3,1,2), c(2,0,5,-2), exact=FALSE))
  > stopifnot(all.equal(res$warning, wrn))
  Error: res$warning and wrn are not equal:
    target is NULL, current is character
  Execution halted