Package check result: ERROR Check: examples, Result: ERROR Running examples in ‘aramappings-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: ara_exact_l1 > ### Title: Exact Adaptable Radial Axes (ARA) mappings using the L1 norm > ### Aliases: ara_exact_l1 > > ### ** Examples > > # Define subset of (numerical) variables of the auto_mpg dataset > # 1:"mpg", 4:"horsepower", 5:"weight", 6:"acceleration" > selected_variables <- c(1, 4, 5, 6) > n <- length(selected_variables) > > # Retain only selected variables and rename dataset as X > X <- auto_mpg[, selected_variables] # Select a subset of variables > > # Remove rows with missing values from X > N <- nrow(X) > rows_to_delete <- NULL > for (i in 1:N) { + if (sum(is.na(X[i, ])) > 0) { + rows_to_delete <- c(rows_to_delete, -i) + } + } > X <- X[rows_to_delete, ] > > # Convert X to matrix > X <- apply(as.matrix.noquote(X), 2, as.numeric) > > # Standardize data > Z <- scale(X) > > # Define axis vectors (2-dimensional in this example) > r <- c(0.8, 1, 1.2, 1) > theta <- c(225, 100, 315, 80) * 2 * pi / 360 > V <- pracma::zeros(n, 2) > for (i in 1:n) { + V[i,1] <- r[i] * cos(theta[i]) + V[i,2] <- r[i] * sin(theta[i]) + } > > # Select variable for exact estimates, and use it for coloring the embedded > # points > variable <- sample(1:n, 1) > > # Detect the number of available CPU cores > if (requireNamespace("parallelly", quietly = TRUE)) { + NCORES <- parallelly::availableCores(omit = 1) + } else { + NCORES <- parallel::detectCores() - 1 + } > > # Create a cluster for parallel processing > cl <- parallel::makeCluster(NCORES) Error in .check_ncores(length(names)) : 31 simultaneous processes spawned Calls: -> makePSOCKcluster -> .check_ncores Execution halted Check: tests, Result: ERROR Running ‘testthat.R’ [39s/39s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(aramappings) > > test_check("aramappings") Saving _problems/test-ara_exact_l1-201.R [ FAIL 1 | WARN 0 | SKIP 3 | PASS 344 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • {parallelly} is not installed. (3): 'test-ara_exact_linf.R:189:1', 'test-ara_unconstrained_l1.R:198:1', 'test-ara_unconstrained_linf.R:199:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-ara_exact_l1.R:201:1'): (code run outside of `test_that()`) ──── Error in `.check_ncores(length(names))`: 31 simultaneous processes spawned Backtrace: ▆ 1. └─parallel::makeCluster(NCORES) at test-ara_exact_l1.R:201:1 2. └─parallel::makePSOCKcluster(names = spec, ...) 3. └─parallel:::.check_ncores(length(names)) [ FAIL 1 | WARN 0 | SKIP 3 | PASS 344 ] Error: ! Test failures. Execution halted