R Under development (unstable) (2024-09-14 r87148 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ### test.R: Runs all RUnit tests that work when the functions are accessed by direct > ### import (i.e., pls::mvr(...)) > > > ## Get warnings at once > options(warn = 1) > > ## Make sure the global environment is clean: > rm(list = ls(all = TRUE)) > > ## Get the data > data(yarn, package = "pls") > data(oliveoil, package = "pls") > data(gasoline, package = "pls") > > ## Get RUnit and utility functions > library(RUnit) > source("RUnit/common/utils.R") > > ## Make checkException silent > opts <- getOption("RUnit") > opts$silent <- TRUE > options(RUnit = opts) > > ## Define and check test suite > testdirs <- c("RUnit/import") > plsTestSuite <- defineTestSuite("pls", testdirs) > isValidTestSuite(plsTestSuite) [1] TRUE > > ## Run test suite > printTextProtocol(res <- runTestSuite(plsTestSuite)) Warning in RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties Warning in RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry Executing test function test.mvr ... done successfully. Executing test function test.pcr ... done successfully. Executing test function test.plsr ... done successfully. Warning in RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: Marsaglia-Multicarry has poor statistical properties Warning in RNGkind(kind = testSuite$rngKind, normal.kind = testSuite$rngNormalKind) : RNGkind: severe deviations from normality for Kinderman-Ramage + Marsaglia-Multicarry Executing test function test.options ... done successfully. RUNIT TEST PROTOCOL -- Sun Sep 15 22:00:45 2024 *********************************************** Number of test functions: 4 Number of errors: 0 Number of failures: 0 1 Test Suite : pls - 4 test functions, 0 errors, 0 failures Details *************************** Test Suite: pls Test function regexp: ^test.+ Test file regexp: ^runit.+\.[rR]$ Involved directory: RUnit/import --------------------------- Test file: RUnit/import/runit.fit.R test.mvr: (1 checks) ... OK (0.01 seconds) test.pcr: (1 checks) ... OK (0 seconds) test.plsr: (1 checks) ... OK (0 seconds) --------------------------- Test file: RUnit/import/runit.options.R test.options: (2 checks) ... OK (0 seconds) > if (res$pls$nFail > 0 || res$pls$nErr > 0) stop("One or more tests failed") > > proc.time() user system elapsed 0.17 0.04 0.20