Package check result: OK Changes to worse in reverse depends: Package: ForeCA Check: examples New result: ERROR Running examples in ‘ForeCA-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: ForeCA-package > ### Title: Implementation of Forecastable Component Analysis (ForeCA) > ### Aliases: ForeCA-package ForeCA > ### Keywords: package > > ### ** Examples > > XX <- ts(diff(log(EuStockMarkets))) > Omega(XX) Error in aperm.default(mvspec.output$fxx, c(3, 1, 2)) : invalid first argument, must be an array Calls: Omega ... mvspectrum -> .mvspec2mvspectrum -> -> aperm.default Execution halted Package: ForeCA Check: re-building of vignette outputs New result: ERROR Error(s) in re-building vignettes: ... --- re-building ‘Introduction.Rmd’ using knitr ** Processing: figure/plot-returns-1.png 504x504 pixels, 8 bits/pixel, 256 colors in palette Reducing image to 8 bits/pixel, grayscale Input IDAT size = 43714 bytes Input file size = 44632 bytes Trying: zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 41854 zc = 9 zm = 8 zs = 1 f = 0 IDAT size = 41126 zc = 1 zm = 8 zs = 2 f = 0 zc = 9 zm = 8 zs = 3 f = 0 zc = 9 zm = 8 zs = 0 f = 5 IDAT size = 38352 zc = 9 zm = 8 zs = 1 f = 5 IDAT size = 37248 zc = 1 zm = 8 zs = 2 f = 5 zc = 9 zm = 8 zs = 3 f = 5 Selecting parameters: zc = 9 zm = 8 zs = 1 f = 5 IDAT size = 37248 Output IDAT size = 37248 bytes (6466 bytes decrease) Output file size = 37326 bytes (7306 bytes = 16.37% decrease) ** Processing: figure/acf-spectra-1.png 504x504 pixels, 3x8 bits/pixel, RGB Input IDAT size = 86593 bytes Input file size = 86791 bytes Trying: zc = 9 zm = 8 zs = 0 f = 0 zc = 9 zm = 8 zs = 1 f = 0 zc = 1 zm = 8 zs = 2 f = 0 zc = 9 zm = 8 zs = 3 f = 0 zc = 9 zm = 8 zs = 0 f = 5 IDAT size = 85610 zc = 9 zm = 8 zs = 1 f = 5 IDAT size = 83481 zc = 1 zm = 8 zs = 2 f = 5 zc = 9 zm = 8 zs = 3 f = 5 Selecting parameters: zc = 9 zm = 8 zs = 1 f = 5 IDAT size = 83481 Output IDAT size = 83481 bytes (3112 bytes decrease) Output file size = 83559 bytes (3232 bytes = 3.72% decrease) ** Processing: figure/acf-spectra-2.png 504x504 pixels, 3x8 bits/pixel, RGB Input IDAT size = 21063 bytes Input file size = 21165 bytes Trying: zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 16734 zc = 9 zm = 8 zs = 1 f = 0 zc = 1 zm = 8 zs = 2 f = 0 zc = 9 zm = 8 zs = 3 f = 0 zc = 9 zm = 8 zs = 0 f = 5 zc = 9 zm = 8 zs = 1 f = 5 zc = 1 zm = 8 zs = 2 f = 5 zc = 9 zm = 8 zs = 3 f = 5 Selecting parameters: zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 16734 Output IDAT size = 16734 bytes (4329 bytes decrease) Output file size = 16812 bytes (4353 bytes = 20.57% decrease) Quitting from lines 131-133 [omega-eu-stocks] (Introduction.Rmd) Error: processing vignette 'Introduction.Rmd' failed with diagnostics: invalid first argument, must be an array --- failed re-building ‘Introduction.Rmd’ SUMMARY: processing the following file failed: ‘Introduction.Rmd’ Error: Vignette re-building failed. Execution halted Package: ForeCA Check: tests New result: ERROR Running ‘testthat.R’ [4s/4s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > test_check("ForeCA") Loading required package: ForeCA This is 'ForeCA' version 0.2.7. See https://github.com/gmgeorg/ForeCA for latest updates and citation("ForeCA"). May the ForeC be with you. Seed used in testing 548676 zero-mean: Mean absolute difference: 1.513723 unit-variance: Mean relative difference: 2.542441 uncorrelated: Mean absolute difference: 0.3752561 [1] "Start preprocessing" [1] "Close preprocessing" [1] "Perform slow feature analysis" [1] "epsC*lammax= 0" [1] "SFA1 closed" zero-mean: Mean absolute difference: 0.04402583 unit-variance: Mean relative difference: 0.05529287 uncorrelated: Mean absolute difference: 0.05891562 unit-variance: Mean relative difference: 0.05529287 uncorrelated: Mean absolute difference: 0.05891562 uncorrelated: Mean absolute difference: 0.05891562 [ FAIL 14 | WARN 5 | SKIP 0 | PASS 188 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_Omega.R:12:1'): (code run outside of `test_that()`) ──────────── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::Omega(kTimeSeries) at test_Omega.R:12:1 2. └─base::apply(...) 3. └─ForeCA (local) FUN(newX[, i], ...) 4. └─ForeCA::Omega(...) 5. └─ForeCA::spectral_entropy(...) 6. └─ForeCA::mvspectrum(...) 7. └─ForeCA:::.mvspec2mvspectrum(...) 8. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 9. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_foreca-utils.R:23:1'): (code run outside of `test_that()`) ───── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::foreca.one_weightvector(U = UU) at test_foreca-utils.R:23:1 2. └─ForeCA::Omega(UU, spectrum.control = spectrum.control, entropy.control = entropy.control) 3. └─base::apply(...) 4. └─ForeCA (local) FUN(newX[, i], ...) 5. └─ForeCA::Omega(...) 6. └─ForeCA::spectral_entropy(...) 7. └─ForeCA::mvspectrum(...) 8. └─ForeCA:::.mvspec2mvspectrum(...) 9. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 10. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_foreca.EM-aux.R:32:3'): (code run outside of `test_that()`) ──── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::mvspectrum(yy.UU, method = mm, normalize = TRUE) at test_foreca.EM-aux.R:32:3 2. └─ForeCA:::.mvspec2mvspectrum(...) 3. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 4. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_foreca.R:28:1'): (code run outside of `test_that()`) ─────────── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::foreca.one_weightvector(U = UU) at test_foreca.R:28:1 2. └─ForeCA::Omega(UU, spectrum.control = spectrum.control, entropy.control = entropy.control) 3. └─base::apply(...) 4. └─ForeCA (local) FUN(newX[, i], ...) 5. └─ForeCA::Omega(...) 6. └─ForeCA::spectral_entropy(...) 7. └─ForeCA::mvspectrum(...) 8. └─ForeCA:::.mvspec2mvspectrum(...) 9. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 10. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_initialize_weightvector.R:32:3'): Max is actually max Omega ──── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test_initialize_weightvector.R:32:3 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::which.max(Omega(kWhitened, spectrum.control = list(method = "mvspec"))) 5. └─ForeCA::Omega(kWhitened, spectrum.control = list(method = "mvspec")) 6. └─base::apply(...) 7. └─ForeCA (local) FUN(newX[, i], ...) 8. └─ForeCA::Omega(...) 9. └─ForeCA::spectral_entropy(...) 10. └─ForeCA::mvspectrum(...) 11. └─ForeCA:::.mvspec2mvspectrum(...) 12. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 13. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_mvspectrum.R:86:5'): mvspectrum(x) must give sum close to var(x) / 2 ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::mvspectrum(scale(kSeries[, 2], scale = FALSE), method = mm) at test_mvspectrum.R:86:5 2. └─ForeCA:::.mvspec2mvspectrum(...) 3. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 4. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_mvspectrum.R:217:5'): normalize makes it add up to 0.5 ───────── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::mvspectrum(scale(kSeries[, 2]), method = mm, normalize = TRUE) at test_mvspectrum.R:217:5 2. └─ForeCA:::.mvspec2mvspectrum(...) 3. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 4. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_mvspectrum.R:290:5'): L2 norm = 1 combination of whitened series: spectrum_of_linear_combination ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::mvspectrum(yy.tmp, method = mm, normalize = TRUE) at test_mvspectrum.R:290:5 2. └─ForeCA:::.mvspec2mvspectrum(...) 3. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 4. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_spectral_entropy.R:25:5'): spectral_entropy is between 0 and 1 ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─base::apply(kTimeSeries, 2, spectral_entropy, spectrum.control = sc.tmp) at test_spectral_entropy.R:25:5 2. └─ForeCA (local) FUN(newX[, i], ...) 3. └─ForeCA::mvspectrum(...) 4. └─ForeCA:::.mvspec2mvspectrum(...) 5. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 6. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_spectral_entropy.R:36:5'): Independent of location/scale: spectral_entropy ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::spectral_entropy(kTimeSeries[, 1], spectrum.control = sc.tmp) at test_spectral_entropy.R:36:5 2. └─ForeCA::mvspectrum(...) 3. └─ForeCA:::.mvspec2mvspectrum(...) 4. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 5. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_spectral_entropy.R:48:5'): White noise is has high spectral entropy ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::spectral_entropy(rnorm(10000), spectrum.control = sc.tmp) at test_spectral_entropy.R:48:5 2. └─ForeCA::mvspectrum(...) 3. └─ForeCA:::.mvspec2mvspectrum(...) 4. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 5. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_spectral_entropy.R:55:5'): signal + noise has larger entropy than signal ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. ├─testthat::expect_lt(...) at test_spectral_entropy.R:55:5 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─ForeCA::spectral_entropy(xx.tmp, spectrum.control = sc.tmp) 5. └─ForeCA::mvspectrum(...) 6. └─ForeCA:::.mvspec2mvspectrum(...) 7. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 8. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_spectral_entropy.R:61:5'): Adding prior weight increses spectral entropy ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::spectral_entropy(xx.tmp, spectrum.control = sc.tmp) at test_spectral_entropy.R:61:5 2. └─ForeCA::mvspectrum(...) 3. └─ForeCA:::.mvspec2mvspectrum(...) 4. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 5. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) ── Error ('test_spectral_entropy.R:69:3'): (code run outside of `test_that()`) ── Error in `aperm.default(mvspec.output$fxx, c(3, 1, 2))`: invalid first argument, must be an array Backtrace: ▆ 1. └─ForeCA::mvspectrum(xx.tmp, method = sc.tmp$method) at test_spectral_entropy.R:69:3 2. └─ForeCA:::.mvspec2mvspectrum(...) 3. ├─base::aperm(mvspec.output$fxx, c(3, 1, 2)) 4. └─base::aperm.default(mvspec.output$fxx, c(3, 1, 2)) [ FAIL 14 | WARN 5 | SKIP 0 | PASS 188 ] Error: Test failures Execution halted