Running 'testthat.R' [74s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(mapi)
  > 
  > test_check("mapi")
  Checking data...
  `metric` provided as a vector
  Unique names ... OK
  All samples used in metric ... OK
  ... 200 samples and 39800 metric left.
  Estimated halfwidth: 286.835888
  Estimated halfwidth: 143.417944
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  Linking to GEOS 3.14.1, GDAL 3.12.1, PROJ 9.7.1; sf_use_s2() is TRUE
  Building local cartesian grid...
  ... 1071 cells
  Building worldwide lat/lon grid...
  Resolution: 5, Area (km^2): 209903.548034604, Spacing (km): 452.492014449456, CLS (km): 517.004996903084
  ... 2432 cells
  Building local cartesian grid...
  ... 1071 cells
  MAPI COMPUTATION STARTED
  Checking data...
  `metric` provided as a vector
  Unique names ... OK
  All samples used in metric ... OK
  ... 200 samples and 39800 metric left.
  Building 20100 elliptical polygons...
  ... 20100 ellipses.    [user: 1.950, system: 0.040, elapsed: 2.000 seconds]
  Computing spatial intersection between 1071 grid cells and 20100 ellipses...
  ... done.  [user: 11.910, system: 0.040, elapsed: 11.950 seconds]
  Building sample pairs...
  ... 39800 sample pairs.  [user: 0.250, system: 0.000, elapsed: 0.250 seconds]
  Matching grid cells with sample pairs...
  ... 2295394 matches found.  [user: 6.280, system: 1.060, elapsed: 7.310 seconds]
  Computing values for grid cells...
  ... done.  [user: 0.180, system: 0.000, elapsed: 0.180 seconds]
  MAPI COMPUTATION ENDED.  [TOTAL: user: 21.440, system: 1.170, elapsed: 22.600 seconds]
  MAPI COMPUTATION STARTED
  Checking data...
  `metric` provided as a vector
  Unique names ... OK
  All samples used in metric ... OK
  ... 200 samples and 39800 metric left.
  Building 20100 elliptical polygons...
  ... 20100 ellipses.    [user: 1.970, system: 0.110, elapsed: 2.060 seconds]
  Computing spatial intersection between 1071 grid cells and 20100 ellipses...
  ... done.  [user: 11.820, system: 0.000, elapsed: 11.850 seconds]
  Building sample pairs...
  ... 39800 sample pairs.  [user: 0.280, system: 0.000, elapsed: 0.280 seconds]
  Matching grid cells with sample pairs...
  ... 2295394 matches found.  [user: 6.470, system: 0.800, elapsed: 7.180 seconds]
  Computing values for grid cells...
  ... done.  [user: 0.170, system: 0.000, elapsed: 0.170 seconds]
  MAPI COMPUTATION ENDED.  [TOTAL: user: 21.480, system: 0.930, elapsed: 22.320 seconds]
  MAPI COMPUTATION STARTED
  Checking data...
  `metric` provided as a vector
  Unique names ... OK
  All samples used in metric ... OK
  ... 200 samples and 39800 metric left.
  Building 20100 elliptical polygons...
  ... 20100 ellipses.    [user: 2.000, system: 0.060, elapsed: 2.060 seconds]
  Computing spatial intersection between 1071 grid cells and 20100 ellipses...
  ... done.  [user: 11.740, system: 0.030, elapsed: 11.770 seconds]
  Building sample pairs...
  ... 39800 sample pairs.  [user: 0.210, system: 0.020, elapsed: 0.250 seconds]
  Matching grid cells with sample pairs...
  ... 2295394 matches found.  [user: 6.590, system: 1.170, elapsed: 7.670 seconds]
  Computing values for grid cells...
  ... done.  [user: 0.170, system: 0.000, elapsed: 0.180 seconds]
  Starting 4 permutations...
  ... parallelized over 2 cores ...
  
  ... computing probabilities from permuted values ...
  ... done.  [user: 0.480, system: 0.090, elapsed: 1.800 seconds]
  MAPI COMPUTATION ENDED.  [TOTAL: user: 22.250, system: 1.410, elapsed: 24.800 seconds]
  Building local cartesian grid...