* using log directory 'd:/Rcompile/CRANpkg/local/4.6/matrixTests.Rcheck' * using R Under development (unstable) (2025-09-24 r88873 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.2.0 GNU Fortran (GCC) 14.2.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'matrixTests' can be installed ... OK * checking installed package size ... OK * 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 ... [0s] OK * checking whether the package can be loaded with stated dependencies ... [0s] OK * checking whether the package can be unloaded cleanly ... [0s] OK * checking whether the namespace can be loaded with stated dependencies ... [0s] OK * checking whether the namespace can be unloaded cleanly ... [0s] OK * checking loading without being on the library search path ... [0s] 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 ... [7s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... 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 ... [1s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [104s] ERROR Running 'andersondarling_behaviour.r' [0s] Running 'andersondarling_correctness.r' [1s] Running 'andersondarling_errors.r' [0s] Running 'andersondarling_warnings.r' [0s] Running 'bartlett_behaviour.r' [0s] Running 'bartlett_correctness.r' [3s] Running 'bartlett_errors.r' [0s] Running 'bartlett_warnings.r' [0s] Running 'brownforsythe_behaviour.r' [0s] Running 'brownforsythe_correctness.r' [9s] Running 'brownforsythe_errors.r' [0s] Running 'brownforsythe_warnings.r' [0s] Running 'cor_pearson_behaviour.r' [0s] Running 'cor_pearson_correctness.r' [1s] Running 'cor_pearson_errors.r' [0s] Running 'cor_pearson_warnings.r' [0s] Running 'cosinor_behaviour.r' [0s] Running 'cosinor_correctness.r' [18s] Running 'cosinor_errors.r' [0s] Running 'cosinor_warnings.r' [0s] Running 'f_var_behaviour.r' [0s] Running 'f_var_correctness.r' [1s] Running 'f_var_errors.r' [0s] Running 'f_var_warnings.r' [0s] Running 'flignerkilleen_behaviour.r' [0s] Running 'flignerkilleen_correctness.r' [3s] Running 'flignerkilleen_errors.r' [0s] Running 'flignerkilleen_warnings.r' [0s] Running 'jarquebera_behaviour.r' [0s] Running 'jarquebera_correctness.r' [1s] Running 'jarquebera_errors.r' [0s] Running 'jarquebera_warnings.r' [0s] Running 'kolmogorovsmirnov_twosample_behavioiur.r' [0s] Running 'kolmogorovsmirnov_twosample_correctness.r' [8s] Running 'kolmogorovsmirnov_twosample_errors.r' [0s] Running 'kolmogorovsmirnov_twosample_warnings.r' [0s] Running 'kruskalwallis_behaviour.r' [0s] Running 'kruskalwallis_correctness.r' [3s] Running 'kruskalwallis_errors.r' [0s] Running 'kruskalwallis_warnings.r' [0s] Running 'levene_behaviour.r' [0s] Running 'levene_correctness.r' [8s] Running 'levene_errors.r' [0s] Running 'levene_warnings.r' [0s] Running 'oneway_equalvar_behaviour.r' [0s] Running 'oneway_equalvar_correctness.r' [5s] Running 'oneway_equalvar_errors.r' [0s] Running 'oneway_equalvar_warnings.r' [0s] Running 'oneway_welch_behaviour.r' [0s] Running 'oneway_welch_correctness.r' [3s] Running 'oneway_welch_errors.r' [0s] Running 'oneway_welch_warnings.r' [0s] Running 't_equalvar_behaviour.r' [0s] Running 't_equalvar_correctness.r' [1s] Running 't_equalvar_errors.r' [0s] Running 't_equalvar_warnings.r' [0s] Running 't_onesample_behaviour.r' [0s] Running 't_onesample_correctness.r' [1s] Running 't_onesample_errors.r' [0s] Running 't_onesample_warnings.r' [0s] Running 't_paired_behaviour.r' [0s] Running 't_paired_correctness.r' [1s] Running 't_paired_errors.r' [0s] Running 't_paired_warnings.r' [0s] Running 't_welch_behaviour.r' [0s] Running 't_welch_correctness.r' [1s] Running 't_welch_errors.r' [0s] Running 't_welch_warnings.r' [0s] Running 'waerden_behaviour.r' [0s] Running 'waerden_correctness.r' [3s] Running 'waerden_errors.r' [0s] Running 'waerden_warnings.r' [0s] Running 'wilcoxon_onesample_behaviour.r' [0s] Running 'wilcoxon_onesample_correctness.r' [2s] Running 'wilcoxon_onesample_errors.r' [0s] Running 'wilcoxon_onesample_warnings.r' [0s] Running 'wilcoxon_paired_behaviour.r' [0s] Running 'wilcoxon_paired_correctness.r' [2s] Running 'wilcoxon_paired_errors.r' [0s] Running 'wilcoxon_paired_warnings.r' [0s] Running 'wilcoxon_twosample_behaviour.r' [0s] Running 'wilcoxon_twosample_correctness.r' [5s] Running 'wilcoxon_twosample_errors.r' [0s] Running 'wilcoxon_twosample_warnings.r' [0s] 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 "statistic": Mean relative difference: 0.2121896 Component "pvalue": Mean relative difference: 0.02290023 Component "corrected": 279 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 "statistic": Mean relative difference: 0.2668394 Component "pvalue": Mean relative difference: 0.04605663 Component "corrected": 168 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.02700617 Component "corrected": 229 element mismatches Execution halted * checking PDF version of manual ... [20s] OK * checking HTML version of manual ... [3s] OK * DONE Status: 1 ERROR