* using log directory 'd:/Rcompile/CRANpkg/local/4.3/krm.Rcheck' * using R Under development (unstable) (2022-08-11 r82713 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: UTF-8 * checking for file 'krm/DESCRIPTION' ... OK * this is package 'krm' version '2020.5-20' * 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 'krm' 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 R 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 ... [5s] 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 contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking line endings in C/C++/Fortran sources/headers ... OK * checking line endings in Makefiles ... OK * checking compilation flags in Makevars ... OK * checking for GNU extensions in Makefiles ... OK * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK * checking use of PKG_*FLAGS in Makefiles ... OK * checking include directives in Makefiles ... OK * checking pragmas in C/C++ headers and code ... OK * checking compiled code ... OK * checking examples ... [2s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [7s] ERROR Running 'doRUnit.R' [7s] Running the tests in 'tests/doRUnit.R' failed. Complete output: > ## unit tests will not be done if RUnit is not available > if(require("RUnit", quietly=TRUE)) { + + ## --- Setup --- + + pkg <- "krm" # <-- Change to package name! + if(Sys.getenv("RCMDCHECK") == "FALSE") { + ## Path to unit tests for standalone running under Makefile (not R CMD check) + ## PKG/tests/../inst/unitTests + path <- file.path(getwd(), "unitTests") + } else { + ## Path to unit tests for R CMD check + ## PKG.Rcheck/tests/../PKG/unitTests + path <- system.file("unitTests", package=pkg) + } + cat("\nRunning unit tests\n") + print(list(pkg=pkg, getwd=getwd(), pathToUnitTests=path)) + + library(package=pkg, character.only=TRUE) + + ## If desired, load the name space to allow testing of private functions + ## if (is.element(pkg, loadedNamespaces())) + ## attach(loadNamespace(pkg), name=paste("namespace", pkg, sep=":"), pos=3) + ## + ## or simply call PKG:::myPrivateFunction() in tests + + ## --- Testing --- + + ## Define tests + testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), + dirs=path) + ## Run + tests <- runTestSuite(testSuite) + + ## Default report name + pathReport <- tempdir() + + + ## Report to stdout and text files + cat("------------------- UNIT TEST SUMMARY ---------------------\n\n") + printTextProtocol(tests, showDetails=FALSE) + # printTextProtocol(tests, showDetails=FALSE, + # fileName=paste(pathReport, "Summary.txt", sep="")) + # printTextProtocol(tests, showDetails=TRUE, + # fileName=paste(pathReport, ".txt", sep="")) + # + # ## Report to HTML file + # printHTMLProtocol(tests, fileName=paste(pathReport, ".html", sep="")) + + ## Return stop() to cause R CMD check stop in case of + ## - failures i.e. FALSE to unit tests or + ## - errors i.e. R errors + tmp <- getErrors(tests) + if(tmp$nFail > 0 | tmp$nErr > 0) { + stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail, + ", #R errors: ", tmp$nErr, ")\n\n", sep="")) + } + } else { + warning("cannot run unit tests -- package RUnit is not available") + } Running unit tests $pkg [1] "krm" $getwd [1] "d:/Rcompile/CRANpkg/local/4.3/krm.Rcheck/tests" $pathToUnitTests [1] "D:/temp/RtmpiI0Y0E/RLIBS_dc04439e53ad/krm/unitTests" Loading required package: kyotil Executing test function test.getSeqKernel ... done successfully. Executing test function test.krm.mos.test ... Loading required namespace: MASS Total time passed: Time difference of 3.641244 secs num [1:100, 1:100] 1 0.01383 0.03779 0.00277 0.00143 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:100] "1" "2" "3" "4" ... ..$ : chr [1:100] "1" "2" "3" "4" ... num [1:100, 1:100] 0.97747 -0.02172 0.0023 -0.00945 -0.01565 ... num [1:100, 1:100] 1 0.996 0.997 0.994 0.994 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:100] "1" "2" "3" "4" ... ..$ : chr [1:100] "1" "2" "3" "4" ... num [1:100, 1:100] 0.97747 -0.02172 0.0023 -0.00945 -0.01565 ... Total time passed: Time difference of 1.185989 secs Timing stopped at: 4.57 0.33 4.91 Error in checkEqualsNumeric(test$p.values, c(0.87, NA, 0.89, NA), tolerance = tolerance) : Mean relative difference: 0.04142012 In addition: Warning messages: 1: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 2: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry 3: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 4: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry done successfully. Executing test function test.krm.score.test ... done successfully. ------------------- UNIT TEST SUMMARY --------------------- RUNIT TEST PROTOCOL -- Sat Aug 13 16:14:19 2022 *********************************************** Number of test functions: 3 Number of errors: 0 Number of failures: 1 1 Test Suite : krm unit testing - 3 test functions, 0 errors, 1 failure FAILURE in test.krm.mos.test: Error in checkEqualsNumeric(test$p.values, c(0.87, NA, 0.89, NA), tolerance = tolerance) : Mean relative difference: 0.04142012 Error: unit testing failed (#test failures: 1, #R errors: 0) In addition: Warning messages: 1: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties 2: In RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry Execution halted * checking PDF version of manual ... OK * DONE Status: 1 ERROR