Running ‘testthat.R’ [48s/105s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(madrat)
  Loading required package: magclass
  
  Attaching package: 'magclass'
  
  The following objects are masked from 'package:base':
  
      pmax, pmin
  
  > 
  > test_check("madrat")
  Saving _problems/test-toolAggregate-27.R
  Saving _problems/test-toolAggregate-39.R
  Saving _problems/test-toolAggregate-68.R
  Saving _problems/test-toolAggregate-74.R
  Saving _problems/test-toolAggregate-96.R
  Saving _problems/test-toolISOhistorical-8.R
  [ FAIL 6 | WARN 0 | SKIP 8 | PASS 650 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (7): 'test-calcOutput.R:23:3', 'test-calcOutput.R:114:3',
    'test-metadataGFZ.R:2:3', 'test-puc.R:2:3', 'test-readSource.R:58:3',
    'test-readSource.R:64:3', 'test-readSource.R:73:3'
  • {reshape2} is not installed (1): 'test-calcOutput.R:459:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-toolAggregate.R:27:3'): Identity mapping is not changing the data ──
  Error in `x@.Data[i, j, k, drop = FALSE]`: incorrect number of dimensions
  Backtrace:
      ▆
   1. ├─testthat::expect_equivalent(toolAggregate(pimpf, map2), pimpf) at test-toolAggregate.R:27:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─madrat::toolAggregate(pimpf, map2)
   5.   └─base::apply(x, which(1:3 != dim), matrixMultiplication, rel)
   6.     ├─newX[, i]
   7.     └─newX[, i]
   8.       └─magclass (local) .local(x, i, j, ..., drop = drop)
  ── Error ('test-toolAggregate.R:39:3'): NAs and Infs in input data are treated correctly ──
  Error in `x@.Data[i, j, k, drop = FALSE]`: incorrect number of dimensions
  Backtrace:
      ▆
   1. ├─testthat::expect_identical(...) at test-toolAggregate.R:39:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─madrat (local) noC(round(toolAggregate(pm2, map, partrel = TRUE)))
   5. └─madrat::toolAggregate(pm2, map, partrel = TRUE) at test-toolAggregate.R:18:3
   6.   └─base::apply(x, which(1:3 != dim), matrixMultiplication, rel)
   7.     ├─newX[, i]
   8.     └─newX[, i]
   9.       └─magclass (local) .local(x, i, j, ..., drop = drop)
  ── Error ('test-toolAggregate.R:68:3'): NA columns in weight are summed up ─────
  Error in `x@.Data[i, j, k, drop = FALSE]`: incorrect number of dimensions
  Backtrace:
       ▆
    1. ├─testthat::expect_equivalent(...) at test-toolAggregate.R:68:3
    2. │ └─testthat::quasi_label(enquo(expected), expected.label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─madrat (local) noC(toolAggregate(pm, map, weight = w, mixed_aggregation = TRUE))
    5. └─madrat::toolAggregate(pm, map, weight = w, mixed_aggregation = TRUE) at test-toolAggregate.R:18:3
    6.   └─madrat::toolAggregate(...)
    7.     └─base::apply(x, which(1:3 != dim), matrixMultiplication, rel)
    8.       ├─newX[, i]
    9.       └─newX[, i]
   10.         └─magclass (local) .local(x, i, j, ..., drop = drop)
  ── Error ('test-toolAggregate.R:74:3'): NA in weight leads to summation and other weight to weighting ──
  Error in `x@.Data[i, j, k, drop = FALSE]`: incorrect number of dimensions
  Backtrace:
      ▆
   1. ├─madrat (local) noC(toolAggregate(pm, map, weight = w, mixed_aggregation = TRUE)) at test-toolAggregate.R:74:3
   2. └─madrat::toolAggregate(pm, map, weight = w, mixed_aggregation = TRUE) at test-toolAggregate.R:18:3
   3.   └─madrat::toolAggregate(...)
   4.     └─base::apply(x, which(1:3 != dim), matrixMultiplication, rel)
   5.       ├─newX[, i]
   6.       └─newX[, i]
   7.         └─magclass (local) .local(x, i, j, ..., drop = drop)
  ── Error ('test-toolAggregate.R:94:3'): partrel=TRUE works in combination with weights ──
  Error in `x@.Data[i, j, k, drop = FALSE]`: incorrect number of dimensions
  Backtrace:
      ▆
   1. ├─testthat::expect_equivalent(...) at test-toolAggregate.R:94:3
   2. │ └─testthat::quasi_label(enquo(expected), expected.label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─madrat::toolAggregate(...)
   5.   └─madrat::toolAggregate(...)
   6.     └─base::apply(x, which(1:3 != dim), matrixMultiplication, rel)
   7.       ├─newX[, i]
   8.       └─newX[, i]
   9.         └─magclass (local) .local(x, i, j, ..., drop = drop)
  ── Error ('test-toolISOhistorical.R:8:3'): Historic data is properly translated ──
  Error in `x@.Data[i, j, k, drop = FALSE]`: incorrect number of dimensions
  Backtrace:
      ▆
   1. └─madrat::toolISOhistorical(a) at test-toolISOhistorical.R:8:3
   2.   └─madrat::toolAggregate(...)
   3.     └─madrat::toolAggregate(...)
   4.       └─base::apply(x, which(1:3 != dim), matrixMultiplication, rel)
   5.         ├─newX[, i]
   6.         └─newX[, i]
   7.           └─magclass (local) .local(x, i, j, ..., drop = drop)
  
  [ FAIL 6 | WARN 0 | SKIP 8 | PASS 650 ]
  Error:
  ! Test failures.
  Execution halted
  Ran 3/3 deferred expressions