Running 'testthat.R' [5s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(zFactor)
  > 
  > test_check("zFactor")
  -- 1. Error: z.stats matches dimension and mean of MAPE. default interval = coar
  could not find function "n"
  1: sapply(sh_corrs, function(corr) expect_equal(dim(z.stats(corr)), c(112, 11))) at testthat/test_stats.R:8
  2: lapply(X = X, FUN = FUN, ...)
  3: FUN(X[[i]], ...)
  4: expect_equal(dim(z.stats(corr)), c(112, 11)) at testthat/test_stats.R:8
  5: quasi_label(enquo(object), label)
  6: eval_bare(get_expr(quo), get_env(quo))
  7: z.stats(corr)
  8: summarise(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), MPE = sum((z.chart - 
         z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 100/n(), 
         MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), MAE = sum(abs(z.chart - 
             z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  9: summarise.tbl_df(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), 
         MPE = sum((z.chart - z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 
             100/n(), MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), 
         MAE = sum(abs(z.chart - z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  10: summarise_impl(.data, dots, environment(), caller_env())
  
  -- 2. Error: z.stats matches dimension and mean of MAPE, interval = fine (@test_
  could not find function "n"
  1: sapply(sh_corrs, function(corr) expect_equal(dim(z.stats(corr)), c(112, 11))) at testthat/test_stats.R:19
  2: lapply(X = X, FUN = FUN, ...)
  3: FUN(X[[i]], ...)
  4: expect_equal(dim(z.stats(corr)), c(112, 11)) at testthat/test_stats.R:19
  5: quasi_label(enquo(object), label)
  6: eval_bare(get_expr(quo), get_env(quo))
  7: z.stats(corr)
  8: summarise(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), MPE = sum((z.chart - 
         z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 100/n(), 
         MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), MAE = sum(abs(z.chart - 
             z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  9: summarise.tbl_df(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), 
         MPE = sum((z.chart - z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 
             100/n(), MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), 
         MAE = sum(abs(z.chart - z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  10: summarise_impl(.data, dots, environment(), caller_env())
  
  -- 3. Error: z.stats matches dimension and mean of MAPE, range = hp (@test_stats
  could not find function "n"
  1: sapply(sh_corrs, function(corr) expect_equal(dim(z.stats(corr)), c(112, 11))) at testthat/test_stats.R:30
  2: lapply(X = X, FUN = FUN, ...)
  3: FUN(X[[i]], ...)
  4: expect_equal(dim(z.stats(corr)), c(112, 11)) at testthat/test_stats.R:30
  5: quasi_label(enquo(object), label)
  6: eval_bare(get_expr(quo), get_env(quo))
  7: z.stats(corr)
  8: summarise(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), MPE = sum((z.chart - 
         z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 100/n(), 
         MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), MAE = sum(abs(z.chart - 
             z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  9: summarise.tbl_df(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), 
         MPE = sum((z.chart - z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 
             100/n(), MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), 
         MAE = sum(abs(z.chart - z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  10: summarise_impl(.data, dots, environment(), caller_env())
  
  -- 4. Error: z.plot.range work for Hall-Yarborough (@test_stats.R#62)  ---------
  could not find function "n"
  1: expect_silent(z.plot.range("HY")) at testthat/test_stats.R:62
  2: quasi_capture(enquo(object), evaluate_promise)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withr::with_output_sink(temp, withCallingHandlers(withVisible(code), warning = handle_warning, 
         message = handle_message))
  5: force(code)
  6: withCallingHandlers(withVisible(code), warning = handle_warning, message = handle_message)
  7: withVisible(code)
  8: eval_bare(get_expr(quo), get_env(quo))
  9: z.plot.range("HY")
  10: z.stats(correlation, pprRange, ...)
  11: summarise(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), MPE = sum((z.chart - 
         z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 100/n(), 
         MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), MAE = sum(abs(z.chart - 
             z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  12: summarise.tbl_df(grouped, z.chart, z.calc, RMSE = sqrt(mean((z.chart - z.calc)^2)), 
         MPE = sum((z.chart - z.calc)/z.chart) * 100/n(), MAPE = sum(abs((z.chart - z.calc)/z.chart)) * 
             100/n(), MSE = sum((z.chart - z.calc)^2)/n(), RSS = sum((z.chart - z.calc)^2), 
         MAE = sum(abs(z.chart - z.calc))/n(), MAAPE = sum(atan(abs((z.chart - z.calc)/z.chart)))/n())
  13: summarise_impl(.data, dots, environment(), caller_env())
  
  == testthat results  ===========================================================
  OK: 120 SKIPPED: 0 FAILED: 4
  1. Error: z.stats matches dimension and mean of MAPE. default interval = coarse (@test_stats.R#8) 
  2. Error: z.stats matches dimension and mean of MAPE, interval = fine (@test_stats.R#19) 
  3. Error: z.stats matches dimension and mean of MAPE, range = hp (@test_stats.R#30) 
  4. Error: z.plot.range work for Hall-Yarborough (@test_stats.R#62) 
  
  Error: testthat unit tests failed
  Execution halted