R Under development (unstable) (2025-04-11 r88138 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 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 for to understand if there is breaking in the code > # when an error is produced. > > Sys.getenv("R_LIBS") [1] "D:\\temp\\2025_04_12_23_10_17_28010\\Rtmp8ANAix\\RLIBS_185342b5d7a9f" > library() > require("GPArotation") Loading required package: GPArotation > search() [1] ".GlobalEnv" "package:GPArotation" "package:stats" [4] "package:graphics" "package:grDevices" "package:utils" [7] "package:datasets" "package:methods" "Autoloads" [10] "package:base" > Sys.info() sysname release version nodename machine "Windows" "Server x64" "build 20348" "CRANWIN3" "x86-64" login user effective_user udomain "CRAN" "CRAN" "CRAN" "CRANWIN3" > > > all.ok <- TRUE > > # 1-factor model loadings vector > > xv <- runif(5) > > # Testing if single factor models will break when error is called > > #test 1 > y <- try(GPArotation::quartimin(xv), TRUE) > if (!inherits(y, "try-error")) { + print("error messages: test 1 failed") + all.ok <- FALSE + } > > > #test 2 > y <- try(GPForth(xv, method = "quartimax"), TRUE) > if (!inherits(y, "try-error")) { + print("error messages: test 2 failed") + all.ok <- FALSE + } > > #test 3 > y <- try(GPFoblq(xv, method = "quartimin"), TRUE) > if (!inherits(y, "try-error")) { + print("error messages: test 3 failed") + all.ok <- FALSE + } > > # same but with matrix instead of vector > xw <- matrix(xv) > > #test 4 > y <- try(GPForth(xw, method = "quartimax"), TRUE) > if (! grep("rotation does not make sense for single factor models", attr(y, "condition")$message) ) + { + print("error messages: test 4 failed") + all.ok <- FALSE + } > > #test 5 > y <- try(GPFoblq(xw, method = "quartimin"), TRUE) > if (! grep("rotation does not make sense for single factor models", attr(y, "condition")$message) ) + { + print("error messages: test 5 failed") + all.ok <- FALSE + } > > if (! all.ok) stop("some tests FAILED") > > > proc.time() user system elapsed 0.12 0.09 0.20