Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(madrat)
  Loading required package: magclass
  
  Attaching package: 'magclass'
  
  The following object is masked from 'package:grid':
  
      getNames
  
  > 
  > test_check("madrat")
  ── 1. Error: Identity mapping is not changing the data (@test-toolAggregate.R#17
  invalid second argument, must be vector or NULL
  Backtrace:
    1. testthat::expect_equivalent(toolAggregate(pm, map2), pm)
    4. madrat::toolAggregate(pm, map2)
    6. magclass::as.magpie(out, spatial = 1, temporal = 2)
    7. magclass:::.local(x, ...)
   13. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 2. Error: NA columns in weight are summed up (@test-toolAggregate.R#21)  ────
  invalid second argument, must be vector or NULL
  Backtrace:
    1. testthat::expect_equivalent(...)
    4. madrat::toolAggregate(pm, map)
    6. magclass::as.magpie(out, spatial = 1, temporal = 2)
    7. magclass:::.local(x, ...)
   13. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 3. Error: NA in weight leads to summation and other weight to weighting (@tes
  invalid second argument, must be vector or NULL
  Backtrace:
    1. madrat::toolAggregate(pm, map, weight = w, mixed_aggregation = TRUE)
    2. madrat::toolAggregate(...)
    4. magclass::as.magpie(out, spatial = 1, temporal = 2)
    5. magclass:::.local(x, ...)
   11. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 4. Error: partrel=TRUE works in combination with weights (@test-toolAggregate
  invalid second argument, must be vector or NULL
  Backtrace:
    1. testthat::expect_equivalent(...)
    4. madrat::toolAggregate(pm, map3, partrel = TRUE, verbosity = 10)
    6. magclass::as.magpie(out, spatial = 1, temporal = 2)
    7. magclass:::.local(x, ...)
   13. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 5. Error: aggregation in dim=1.2 with regions-only mapping is the same as in 
  invalid second argument, must be vector or NULL
  Backtrace:
    1. testthat::expect_equivalent(...)
    7. madrat::toolAggregate(td, rel, dim = 1.2)
    9. magclass::as.magpie(out, spatial = 1, temporal = 2)
   10. magclass:::.local(x, ...)
   16. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 6. Error: aggregation in dim=1.1 with regions-only mapping is the same as in 
  invalid second argument, must be vector or NULL
  Backtrace:
    1. testthat::expect_equivalent(...)
    7. madrat::toolAggregate(tdeach, rel, dim = 1.1)
    9. magclass::as.magpie(out, spatial = 1, temporal = 2)
   10. magclass:::.local(x, ...)
   16. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 7. Error: disaggregation in dim=1.1 works appropriately (@test-toolAggregate.
  invalid second argument, must be vector or NULL
  Backtrace:
    1. madrat::toolAggregate(tdeach, rel, dim = 1.1)
    3. magclass::as.magpie(out, spatial = 1, temporal = 2)
    4. magclass:::.local(x, ...)
   10. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 8. Error: disaggregation in dim=1.2 works appropriately (@test-toolAggregate.
  invalid second argument, must be vector or NULL
  Backtrace:
    1. madrat::toolAggregate(td, map, dim = 1.2)
    3. magclass::as.magpie(out, spatial = 1, temporal = 2)
    4. magclass:::.local(x, ...)
   10. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ── 9. Error: aggregating across dim=1.1 and then dim=1.2 produces the same resul
  invalid second argument, must be vector or NULL
  Backtrace:
    1. madrat::toolAggregate(td, map, dim = 1.1)
    3. magclass::as.magpie(out, spatial = 1, temporal = 2)
    4. magclass:::.local(x, ...)
   10. magclass::wrap(x, list(d$regiospatial, d$temporal, NA))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 2 | SKIPPED: 1 | WARNINGS: 0 | FAILED: 9 ]
  1. Error: Identity mapping is not changing the data (@test-toolAggregate.R#17) 
  2. Error: NA columns in weight are summed up (@test-toolAggregate.R#21) 
  3. Error: NA in weight leads to summation and other weight to weighting (@test-toolAggregate.R#27) 
  4. Error: partrel=TRUE works in combination with weights (@test-toolAggregate.R#47) 
  5. Error: aggregation in dim=1.2 with regions-only mapping is the same as in dim=1 with region.cell mapping (@test-toolAggregate.R#53) 
  6. Error: aggregation in dim=1.1 with regions-only mapping is the same as in dim=1 with region.cell mapping (@test-toolAggregate.R#58) 
  7. Error: disaggregation in dim=1.1 works appropriately (@test-toolAggregate.R#62) 
  8. Error: disaggregation in dim=1.2 works appropriately (@test-toolAggregate.R#67) 
  9. Error: aggregating across dim=1.1 and then dim=1.2 produces the same result as vice versa (@test-toolAggregate.R#72) 
  
  Error: testthat unit tests failed
  Execution halted