Running 'testthat.R' [5s/6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(belg)
  > 
  > test_check("belg")
  -- 1. Error: test correctness of new aggregation method (@test-aggregation.R#17)
  'MARGIN' does not match dim(X)
  Backtrace:
   1. belg::get_boltzmann(m, relative = TRUE, method = "aggregation")
   2. belg:::get_boltzmann.array(m, relative = TRUE, method = "aggregation")
   3. base::apply(x, MARGIN = 3, get_boltzmann_aggregation, base, relative)
  
  -- 2. Error: relative entropy calc is correct on matrix (@test-matrix.R#90)  ---
  'MARGIN' does not match dim(X)
  Backtrace:
   1. testthat::expect_equal(...)
   5. belg:::get_boltzmann.array(lg, relative = TRUE, base = "log")
   6. base::apply(x, MARGIN = 3, get_boltzmann_default, base, relative)
  
  -- 3. Error: absolute entropy calc is correct on matrix (@test-matrix.R#102)  --
  'MARGIN' does not match dim(X)
  Backtrace:
   1. testthat::expect_equal(...)
   5. belg:::get_boltzmann.array(lg, relative = FALSE, base = "log")
   6. base::apply(x, MARGIN = 3, get_boltzmann_default, base, relative)
  
  -- 4. Error: entropy calc with NA gives lower values (@test-na-and-negative.R#39
  'MARGIN' does not match dim(X)
  Backtrace:
   1. belg::get_boltzmann(set_1, relative = FALSE, base = "log")
   2. belg:::get_boltzmann.array(set_1, relative = FALSE, base = "log")
   3. base::apply(x, MARGIN = 3, get_boltzmann_default, base, relative)
  
  -- 5. Error: entropy calc is correct on data with NA (@test-na-and-negative.R#47
  'MARGIN' does not match dim(X)
  Backtrace:
   1. belg::get_boltzmann(ver_3)
   2. belg:::get_boltzmann.array(ver_3)
   3. base::apply(x, MARGIN = 3, get_boltzmann_default, base, relative)
  
  -- 6. Error: entropy calc is correct on data with negative values (@test-na-and-
  'MARGIN' does not match dim(X)
  Backtrace:
   1. belg::get_boltzmann(ver_1)
   2. belg:::get_boltzmann.array(ver_1)
   3. base::apply(x, MARGIN = 3, get_boltzmann_default, base, relative)
  
  -- 7. Error: entropy calc on a RasterLayer is correct (@test-raster.R#10)  -----
  'MARGIN' does not match dim(X)
  Backtrace:
   1. belg::get_boltzmann(simple_land, relative = FALSE)
   2. belg:::get_boltzmann.RasterLayer(simple_land, relative = FALSE)
   4. belg:::get_boltzmann.array(...)
   5. base::apply(x, MARGIN = 3, get_boltzmann_default, base, relative)
  
  == testthat results  ===========================================================
  [ OK: 4 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 7 ]
  1. Error: test correctness of new aggregation method (@test-aggregation.R#17) 
  2. Error: relative entropy calc is correct on matrix (@test-matrix.R#90) 
  3. Error: absolute entropy calc is correct on matrix (@test-matrix.R#102) 
  4. Error: entropy calc with NA gives lower values (@test-na-and-negative.R#39) 
  5. Error: entropy calc is correct on data with NA (@test-na-and-negative.R#47) 
  6. Error: entropy calc is correct on data with negative values (@test-na-and-negative.R#59) 
  7. Error: entropy calc on a RasterLayer is correct (@test-raster.R#10) 
  
  Error: testthat unit tests failed
  Execution halted