- using R Under development (unstable) (2025-09-02 r88768)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
GNU Fortran (GCC) 15.1.1 20250521 (Red Hat 15.1.1-2)
- running under: Fedora Linux 42 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘matrixTests/DESCRIPTION’ ... OK
- this is package ‘matrixTests’ version ‘0.2.3’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘matrixTests’ can be installed ... [8s/28s] OK
See the install log for details.
- checking package directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [19s/56s] OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking examples ... OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [210s/390s] ERROR
Running ‘andersondarling_behaviour.r’
Running ‘andersondarling_correctness.r’ [3s/11s]
Running ‘andersondarling_errors.r’
Running ‘andersondarling_warnings.r’
Running ‘bartlett_behaviour.r’
Running ‘bartlett_correctness.r’ [7s/26s]
Running ‘bartlett_errors.r’
Running ‘bartlett_warnings.r’
Running ‘brownforsythe_behaviour.r’
Running ‘brownforsythe_correctness.r’ [20s/53s]
Running ‘brownforsythe_errors.r’
Running ‘brownforsythe_warnings.r’
Running ‘cor_pearson_behaviour.r’
Running ‘cor_pearson_correctness.r’
Running ‘cor_pearson_errors.r’
Running ‘cor_pearson_warnings.r’
Running ‘cosinor_behaviour.r’
Running ‘cosinor_correctness.r’ [43s/86s]
Running ‘cosinor_errors.r’
Running ‘cosinor_warnings.r’
Running ‘f_var_behaviour.r’
Running ‘f_var_correctness.r’
Running ‘f_var_errors.r’
Running ‘f_var_warnings.r’
Running ‘flignerkilleen_behaviour.r’
Running ‘flignerkilleen_correctness.r’
Running ‘flignerkilleen_errors.r’
Running ‘flignerkilleen_warnings.r’
Running ‘jarquebera_behaviour.r’
Running ‘jarquebera_correctness.r’
Running ‘jarquebera_errors.r’
Running ‘jarquebera_warnings.r’
Running ‘kolmogorovsmirnov_twosample_behavioiur.r’
Running ‘kolmogorovsmirnov_twosample_correctness.r’ [15s/29s]
Running ‘kolmogorovsmirnov_twosample_errors.r’
Running ‘kolmogorovsmirnov_twosample_warnings.r’
Running ‘kruskalwallis_behaviour.r’
Running ‘kruskalwallis_correctness.r’
Running ‘kruskalwallis_errors.r’
Running ‘kruskalwallis_warnings.r’
Running ‘levene_behaviour.r’
Running ‘levene_correctness.r’ [20s/39s]
Running ‘levene_errors.r’
Running ‘levene_warnings.r’
Running ‘oneway_equalvar_behaviour.r’
Running ‘oneway_equalvar_correctness.r’ [11s/12s]
Running ‘oneway_equalvar_errors.r’
Running ‘oneway_equalvar_warnings.r’
Running ‘oneway_welch_behaviour.r’
Running ‘oneway_welch_correctness.r’
Running ‘oneway_welch_errors.r’
Running ‘oneway_welch_warnings.r’
Running ‘t_equalvar_behaviour.r’
Running ‘t_equalvar_correctness.r’
Running ‘t_equalvar_errors.r’
Running ‘t_equalvar_warnings.r’
Running ‘t_onesample_behaviour.r’
Running ‘t_onesample_correctness.r’
Running ‘t_onesample_errors.r’
Running ‘t_onesample_warnings.r’
Running ‘t_paired_behaviour.r’
Running ‘t_paired_correctness.r’
Running ‘t_paired_errors.r’
Running ‘t_paired_warnings.r’
Running ‘t_welch_behaviour.r’
Running ‘t_welch_correctness.r’
Running ‘t_welch_errors.r’
Running ‘t_welch_warnings.r’
Running ‘waerden_behaviour.r’
Running ‘waerden_correctness.r’
Running ‘waerden_errors.r’
Running ‘waerden_warnings.r’
Running ‘wilcoxon_onesample_behaviour.r’
Running ‘wilcoxon_onesample_correctness.r’
Running ‘wilcoxon_onesample_errors.r’
Running ‘wilcoxon_onesample_warnings.r’
Running ‘wilcoxon_paired_behaviour.r’
Running ‘wilcoxon_paired_correctness.r’
Running ‘wilcoxon_paired_errors.r’
Running ‘wilcoxon_paired_warnings.r’
Running ‘wilcoxon_twosample_behaviour.r’
Running ‘wilcoxon_twosample_correctness.r’
Running ‘wilcoxon_twosample_errors.r’
Running ‘wilcoxon_twosample_warnings.r’
Running the tests in ‘tests/wilcoxon_onesample_correctness.r’ failed.
Complete output:
> library(matrixTests)
>
> #--- functions -----------------------------------------------------------------
>
> base_wilcoxon_onesample <- function(mat, null=0, alternative="two.sided", exact=NA, correct=TRUE) {
+ if(is.vector(mat)) mat <- matrix(mat, nrow=1)
+ if(length(alternative)==1) alternative <- rep(alternative, nrow(mat))
+ if(length(null)==1) null <- rep(null, nrow(mat))
+ if(length(exact)==1) exact <- rep(exact, nrow(mat))
+ if(length(correct)==1) correct <- rep(correct, nrow(mat))
+
+ nx <- stat <- p <- m0 <- numeric(nrow(mat))
+ al <- character(nrow(mat))
+ ext <- cor <- logical(nrow(mat))
+ for(i in 1:nrow(mat)) {
+ vec <- mat[i,][!is.na(mat[i,])]
+ ex <- if(is.na(exact[i])) NULL else exact[i]
+
+ res <- wilcox.test(vec, alternative=alternative[i], mu=null[i], exact=ex, correct=correct[i])
+
+ nx[i] <- sum((vec-null[i]) != 0)
+ stat[i] <- res$statistic
+ p[i] <- res$p.value
+ al[i] <- res$alternative
+ m0[i] <- res$null.value
+
+ cor[i] <- grepl("continuity correction", res$method)
+ ext[i] <- if(is.na(exact[i])) (nx[i] < 50) else exact[i]
+ ext[i] <- if(length(unique(abs(vec-m0[i]))) != length(vec)) FALSE else ext[i]
+ ext[i] <- if(any((vec-m0[i]) == 0)) FALSE else ext[i]
+ }
+
+ data.frame(obs=nx, statistic=stat, pvalue=p, location.null=m0, alternative=al,
+ exact=ext, corrected=cor, stringsAsFactors=FALSE
+ )
+ }
>
>
> #--- montecarlo ----------------------------------------------------------------
>
> # 3 observations
> x <- matrix(rnorm(3000), ncol=3)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- base_wilcoxon_onesample(x, mus, alts, exact=ext, correct=cor)
> res2 <- row_wilcoxon_onesample(x, mus, alts, exact=ext, correct=cor)
> stopifnot(all.equal(res1, res2))
>
> # 60 observations
> x <- matrix(rnorm(60000), ncol=60)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- base_wilcoxon_onesample(x, mus, alts, exact=ext, correct=cor)
> res2 <- row_wilcoxon_onesample(x, mus, alts, exact=ext, correct=cor)
> stopifnot(all.equal(res1, res2))
>
> # 10 observations with ties and zeroes
> x <- matrix(round(runif(10000, -15, 15)), ncol=10)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> mus[sample(length(mus), length(mus)/8)] <- 0
> mus[sample(length(mus), length(mus)/8)] <- 1
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- suppressWarnings(base_wilcoxon_onesample(x, mus, alts, exact=ext, correct=cor))
> res2 <- suppressWarnings(row_wilcoxon_onesample(x, mus, alts, exact=ext, correct=cor))
> stopifnot(all.equal(res1, res2))
Error: res1 and res2 are not equal:
Component "pvalue": Mean relative difference: 0.01809046
Component "corrected": 281 element mismatches
Execution halted
Running the tests in ‘tests/wilcoxon_paired_correctness.r’ failed.
Complete output:
> library(matrixTests)
>
> #--- functions -----------------------------------------------------------------
>
> base_wilcoxon_paired <- function(mat1, mat2, null=0, alternative="two.sided", exact=NA, correct=TRUE) {
+ 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(null)==1) null <- rep(null, nrow(mat1))
+ if(length(exact)==1) exact <- rep(exact, nrow(mat1))
+ if(length(correct)==1) correct <- rep(correct, nrow(mat1))
+
+ nx <- ny <- nxy <- stat <- p <- m0 <- numeric(nrow(mat1))
+ al <- character(nrow(mat1))
+ ext <- cor <- logical(nrow(mat1))
+ for(i in 1:nrow(mat1)) {
+ ex <- if(is.na(exact[i])) NULL else exact[i]
+ res <- wilcox.test(mat1[i,], mat2[i,], alternative=alternative[i], mu=null[i], paired=TRUE, exact=ex, correct=correct[i])
+
+ inds <- complete.cases(mat1[i,], mat2[i,])
+ vec1 <- mat1[i,inds]
+ vec2 <- mat2[i,inds]
+ nx[i] <- sum(!is.na(mat1[i,]))
+ ny[i] <- sum(!is.na(mat2[i,]))
+ nxy[i] <- sum((vec1 - vec2 - null[i]) != 0, na.rm=TRUE)
+ stat[i] <- res$statistic
+ p[i] <- res$p.value
+ al[i] <- res$alternative
+ m0[i] <- res$null.value
+
+ cor[i] <- grepl("continuity correction", res$method)
+ ext[i] <- if(is.na(exact[i])) (nxy[i] < 50) else exact[i]
+ ext[i] <- if(length(unique(abs(vec1-vec2-m0[i]))) != length(vec1)) FALSE else ext[i]
+ ext[i] <- if(any((vec1-vec2-m0[i]) == 0)) FALSE else ext[i]
+ }
+
+ data.frame(obs.x=nx, obs.y=ny, obs.paired=nxy, statistic=stat, pvalue=p,
+ location.null=m0, alternative=al, exact=ext, corrected=cor,
+ stringsAsFactors=FALSE
+ )
+ }
>
>
> #--- montecarlo ----------------------------------------------------------------
>
> # 4 paired samples
> x <- matrix(rnorm(4000), ncol=4)
> y <- matrix(rnorm(4000), ncol=4)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- base_wilcoxon_paired(x, y, mus, alts, exact=ext, correct=cor)
> res2 <- row_wilcoxon_paired(x, y, mus, alts, exact=ext, correct=cor)
> stopifnot(all.equal(res1, res2))
>
> # 60 paired samples
> x <- matrix(rnorm(60000), ncol=60)
> y <- matrix(rnorm(60000), ncol=60)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- base_wilcoxon_paired(x, y, mus, alts, exact=ext, correct=cor)
> res2 <- row_wilcoxon_paired(x, y, mus, alts, exact=ext, correct=cor)
> stopifnot(all.equal(res1, res2))
>
>
> # 6 paired samples per group with ties and zeroes
> x <- matrix(round(runif(6000, -10, 10)), ncol=6)
> y <- matrix(round(runif(6000, -10, 10)), ncol=6)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> mus[sample(length(mus), length(mus)/8)] <- 0
> mus[sample(length(mus), length(mus)/8)] <- 1
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- suppressWarnings(base_wilcoxon_paired(x, y, mus, alts, exact=ext, correct=cor))
> res2 <- suppressWarnings(row_wilcoxon_paired(x, y, mus, alts, exact=ext, correct=cor))
> stopifnot(all.equal(res1, res2))
Error: res1 and res2 are not equal:
Component "pvalue": Mean relative difference: 0.04557973
Component "corrected": 113 element mismatches
Execution halted
Running the tests in ‘tests/wilcoxon_twosample_correctness.r’ failed.
Complete output:
> library(matrixTests)
>
> #--- functions -----------------------------------------------------------------
>
> base_wilcoxon_twosample <- function(mat1, mat2, null=0, alternative="two.sided", exact=NA, correct=TRUE) {
+ 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(null)==1) null <- rep(null, nrow(mat1))
+ if(length(exact)==1) exact <- rep(exact, nrow(mat1))
+ if(length(correct)==1) correct <- rep(correct, nrow(mat1))
+
+ nx <- ny <- nxy <- stat <- p <- m0 <- numeric(nrow(mat1))
+ al <- character(nrow(mat1))
+ ext <- cor <- logical(nrow(mat1))
+ for(i in 1:nrow(mat1)) {
+ ex <- if(is.na(exact[i])) NULL else exact[i]
+
+ res <- wilcox.test(mat1[i,], mat2[i,], alternative=alternative[i], mu=null[i], exact=ex, correct=correct[i])
+
+ 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] <- res$alternative
+ m0[i] <- res$null.value
+
+ cor[i] <- grepl("continuity correction", res$method)
+ ext[i] <- if(is.na(exact[i])) (nx[i] < 50 & ny[i] < 50) else exact[i]
+ ext[i] <- if(length(unique(na.omit(c(mat1[i,]-m0[i], mat2[i,])))) != nxy[i]) FALSE else ext[i]
+ }
+
+ data.frame(obs.x=nx, obs.y=ny, obs.tot=nxy, statistic=stat, pvalue=p,
+ location.null=m0, alternative=al, exact=ext, corrected=cor,
+ stringsAsFactors=FALSE
+ )
+ }
>
>
> #--- montecarlo ----------------------------------------------------------------
>
> # 2 samples in one group and 4 in another
> x <- matrix(rnorm(2000), ncol=2)
> y <- matrix(rnorm(4000), ncol=4)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- base_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor)
> res2 <- row_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor)
> stopifnot(all.equal(res1, res2))
>
> # 51 samples in one group and 51 in another
> x <- matrix(rnorm(51000), ncol=51)
> y <- matrix(rnorm(51000), ncol=51)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- base_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor)
> res2 <- row_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor)
> stopifnot(all.equal(res1, res2))
>
> # 4 samples in one group and 51 in another
> x <- matrix(rnorm(4000), ncol=4)
> y <- matrix(rnorm(51000), ncol=51)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- base_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor)
> res2 <- row_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor)
> stopifnot(all.equal(res1, res2))
>
> # 6 samples per group with ties and zeroes
> x <- matrix(round(runif(6000, -15, 15)), ncol=6)
> y <- matrix(round(runif(6000, -15, 15)), ncol=6)
> alts <- sample(c("t", "g", "l"), nrow(x), replace=TRUE)
> mus <- runif(nrow(x), -1, 1)
> mus[sample(length(mus), length(mus)/8)] <- 0
> mus[sample(length(mus), length(mus)/8)] <- 1
> cor <- sample(c(TRUE, FALSE), nrow(x), replace=TRUE)
> ext <- sample(c(TRUE, FALSE, NA), nrow(x), replace=TRUE)
> res1 <- suppressWarnings(base_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor))
> res2 <- suppressWarnings(row_wilcoxon_twosample(x, y, mus, alts, exact=ext, correct=cor))
> stopifnot(all.equal(res1, res2))
Error: res1 and res2 are not equal:
Component "pvalue": Mean relative difference: 0.02675795
Component "corrected": 228 element mismatches
Execution halted
- checking PDF version of manual ... [7s/12s] OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 1 ERROR