Running 'testthat.R' [77s]
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.930, system: 0.190, elapsed: 2.100 seconds]
  Computing spatial intersection between 1071 grid cells and 20100 ellipses...
  ... done.  [user: 12.080, system: 0.040, elapsed: 12.130 seconds]
  Building sample pairs...
  ... 39800 sample pairs.  [user: 0.380, system: 0.000, elapsed: 0.360 seconds]
  Matching grid cells with sample pairs...
  ... 2295394 matches found.  [user: 7.270, system: 1.080, elapsed: 8.270 seconds]
  Computing values for grid cells...
  ... done.  [user: 0.140, system: 0.000, elapsed: 0.140 seconds]
  MAPI COMPUTATION ENDED.  [TOTAL: user: 22.610, system: 1.330, elapsed: 23.820 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.170, system: 0.080, elapsed: 2.230 seconds]
  Computing spatial intersection between 1071 grid cells and 20100 ellipses...
  ... done.  [user: 12.500, system: 0.010, elapsed: 12.530 seconds]
  Building sample pairs...
  ... 39800 sample pairs.  [user: 0.290, system: 0.010, elapsed: 0.300 seconds]
  Matching grid cells with sample pairs...
  ... 2295394 matches found.  [user: 6.710, system: 1.130, elapsed: 7.590 seconds]
  Computing values for grid cells...
  ... done.  [user: 0.160, system: 0.000, elapsed: 0.160 seconds]
  MAPI COMPUTATION ENDED.  [TOTAL: user: 22.670, system: 1.330, elapsed: 23.770 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.150, system: 0.050, elapsed: 2.200 seconds]
  Computing spatial intersection between 1071 grid cells and 20100 ellipses...
  ... done.  [user: 12.090, system: 0.060, elapsed: 12.160 seconds]
  Building sample pairs...
  ... 39800 sample pairs.  [user: 0.420, system: 0.000, elapsed: 0.420 seconds]
  Matching grid cells with sample pairs...
  ... 2295394 matches found.  [user: 6.440, system: 1.400, elapsed: 7.640 seconds]
  Computing values for grid cells...
  ... done.  [user: 0.170, system: 0.010, elapsed: 0.180 seconds]
  Starting 4 permutations...
  ... parallelized over 2 cores ...
  
  ... computing probabilities from permuted values ...
  ... done.  [user: 0.510, system: 0.130, elapsed: 1.790 seconds]
  MAPI COMPUTATION ENDED.  [TOTAL: user: 22.790, system: 1.690, elapsed: 25.450 seconds]
  Building local cartesian grid...