Running ‘testthat.R’ [40s/137s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > if(require(testthat) & require(forecast)){
  +   test_check("forecastHybrid")
  +   }
  Loading required package: testthat
  Loading required package: forecast
  Loading required package: forecastHybrid
  Hybrid forecast model comprised of the following models: auto.arima, ets, thetam, nnetar, tbats
  ############
  auto.arima with weight 0.2 
  ############
  ets with weight 0.2 
  ############
  thetam with weight 0.2 
  ############
  nnetar with weight 0.2 
  ############
  tbats with weight 0.2 
  Hybrid forecast model comprised of the following models: auto.arima, ets, thetam, nnetar, tbats
  ############
  auto.arima with weight 0.2 
  ############
  ets with weight 0.2 
  ############
  thetam with weight 0.2 
  ############
  nnetar with weight 0.2 
  ############
  tbats with weight 0.2 
  ── 1. Error: Testing the weighting methods (@test-hybridModel.R#186)  ──────────
  one node produced an error: object '.doSnowGlobals' not found
  1: hybridModel(inputSeries, models = models, weights = weight) at testthat/test-hybridModel.R:186
  2: cvts(y, FUN = currentModel, maxHorizon = cvHorizon, horizonAverage = horizonAverage, 
         verbose = FALSE, windowSize = windowSize, num.cores = num.cores)
  3: foreach::foreach(sliceNum = seq_along(slices), .packages = includePackages) %dopar% 
         {
             if (verbose) {
                 cat("Fitting fold", sliceNum, "of", nrow(resultsMat), "\n")
             }
             results <- list()
             trainIndices <- slices[[sliceNum]]$trainIndices
             testIndices <- slices[[sliceNum]]$testIndices
             tsTrain <- tsSubsetWithIndices(x, trainIndices)
             tsTest <- tsSubsetWithIndices(x, testIndices)
             if (xregUse) {
                 xregTrain <- xreg[trainIndices, , drop = FALSE]
                 xregTest <- xreg[testIndices, , drop = FALSE]
                 mod <- do.call(FUN, list(tsTrain, xreg = xregTrain, ...))
                 fc <- do.call(FCFUN, list(mod, xreg = xregTest, h = maxHorizon))
             }
             else {
                 mod <- do.call(FUN, list(tsTrain, ...))
                 fc <- do.call(FCFUN, list(mod, h = maxHorizon))
             }
             if (saveModels) {
                 results$fits <- mod
             }
             if (saveForecasts) {
                 results$forecasts <- fc
             }
             results$resids <- tsTest - fc$mean
             results
         }
  4: e$fun(obj, substitute(ex), parent.frame(), e$data)
  5: clusterCall(cl, workerInit, c.expr, exportenv, pkgname, packages, attachExportEnv)
  6: checkForRemoteErrors(lapply(cl, recvResult))
  7: stop("one node produced an error: ", firstmsg, domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 277 SKIPPED: 0 FAILED: 1
  1. Error: Testing the weighting methods (@test-hybridModel.R#186) 
  
  Error: testthat unit tests failed
  Execution halted