Running ‘testthat.R’ [230s/268s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(CausalGPS)
  > 
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > test_check("CausalGPS")
  2023-05-03 13:01:26.476913 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:01:45.848294 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 196) ... 
  2023-05-03 13:01:46.247706 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  19.9149974416582 in  0.5  radius.
  2023-05-03 13:01:46.590012 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 196)
  2023-05-03 13:01:52.307818 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:02:19.56436 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 490) ... 
  2023-05-03 13:02:19.575246 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 490)
  2023-05-03 13:02:19.618862 gannet.stats.ox.ac.uk 1535923 CausalGPS generate_pseudo_pop WARN:  Effective sample size is less than recommended.Current: 7.36082124077708, recommended min value: 49.
  2023-05-03 13:02:19.710469 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:02:23.047875 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 196) ... 
  2023-05-03 13:02:23.375803 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  21.2300763979248 in  0.5  radius.
  2023-05-03 13:02:23.660572 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 196)
  2023-05-03 13:02:24.980322 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 100) ... 
  2023-05-03 13:02:24.997518 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  -8.74760785492387 in  0.5  radius.
  2023-05-03 13:02:25.004171 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  -7.74760785492387 in  0.5  radius.
  2023-05-03 13:02:25.009765 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  -6.74760785492387 in  0.5  radius.
  2023-05-03 13:02:25.015038 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  -5.74760785492387 in  0.5  radius.
  2023-05-03 13:02:25.021593 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  -4.74760785492387 in  0.5  radius.
  2023-05-03 13:02:25.028585 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  -3.74760785492387 in  0.5  radius.
  2023-05-03 13:02:25.265101 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  21.2523921450761 in  0.5  radius.
  2023-05-03 13:02:25.275203 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  22.2523921450761 in  0.5  radius.
  2023-05-03 13:02:25.280919 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  23.2523921450761 in  0.5  radius.
  2023-05-03 13:02:25.555798 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 100)
  2023-05-03 13:02:25.567098 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 1000) ... 
  2023-05-03 13:02:25.576328 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 1000)
  2023-05-03 13:02:25.906156 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:02:43.445554 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 98) ... 
  2023-05-03 13:02:43.625402 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  17.0145640770203 in  0.5  radius.
  2023-05-03 13:02:43.909995 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 98)
  2023-05-03 13:02:44.041911 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:03:04.592899 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 98) ... 
  2023-05-03 13:03:04.78782 gannet.stats.ox.ac.uk 1535923 CausalGPS FUN WARN:  There is no data to match with  17.0145640770203 in  0.5  radius.
  2023-05-03 13:03:05.027654 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 98)
  2023-05-03 13:03:07.266758 gannet.stats.ox.ac.uk 1535923 CausalGPS estimate_gps WARN:  Vector w has 1 missing values.
  2023-05-03 13:03:07.327782 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:03:37.255754 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 392) ... 
  2023-05-03 13:03:37.842189 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 392)
  2023-05-03 13:03:43.280341 gannet.stats.ox.ac.uk 1535923 CausalGPS estimate_npmetric_erf INFO:  The band width with the minimum risk value: 2.
  2023-05-03 13:03:43.462835 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:17.003461 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 392) ... 
  2023-05-03 13:04:17.91181 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 392)
  2023-05-03 13:04:23.468058 gannet.stats.ox.ac.uk 1535923 CausalGPS estimate_npmetric_erf INFO:  The band width with the minimum risk value: 2.
  2023-05-03 13:04:23.766685 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:29.901021 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 490) ... 
  2023-05-03 13:04:30.564805 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 490)
  2023-05-03 13:04:30.63679 gannet.stats.ox.ac.uk 1535923 CausalGPS generate_pseudo_pop WARN:  Effective sample size is less than recommended.Current: 26.1426863179163, recommended min value: 49.
  2023-05-03 13:04:30.777546 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:33.787287 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:34.20343 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:34.256888 gannet.stats.ox.ac.uk 1535923 CausalGPS generate_pseudo_pop WARN:  Effective sample size is less than recommended.Current: 20.5023661048217, recommended min value: 46.
  2023-05-03 13:04:34.317849 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.369887 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.433862 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.479842 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.53472 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.586802 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.630818 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.692734 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:34.749757 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:37.870384 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:37.879625 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:37.926207 gannet.stats.ox.ac.uk 1535923 CausalGPS generate_pseudo_pop WARN:  Effective sample size is less than recommended.Current: 3.24100498567868, recommended min value: 46.
  2023-05-03 13:04:37.969086 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:41.048835 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:41.434545 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:44.453291 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:44.823665 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:47.863644 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:48.302347 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:51.302596 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:51.698156 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:51.74552 gannet.stats.ox.ac.uk 1535923 CausalGPS generate_pseudo_pop WARN:  Effective sample size is less than recommended.Current: 20.5161021345085, recommended min value: 46.
  2023-05-03 13:04:51.800882 gannet.stats.ox.ac.uk 1535923 CausalGPS log_system_info INFO:  System name: Linux, OS type: unix, machine architecture: x86_64, user: ripley, R Under development (unstable) (2023-05-03 r84385), detected cores: 24
  2023-05-03 13:04:53.703809 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:54.142542 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:55.891602 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:56.352881 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:04:58.108459 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:04:59.167233 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:05:00.980388 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:05:01.442063 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:05:03.205572 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:05:03.586135 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:05:05.31307 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:05:05.787078 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:05:07.513414 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Starting compiling pseudo population  (original data size: 460) ... 
  2023-05-03 13:05:07.942429 gannet.stats.ox.ac.uk 1535923 CausalGPS compile_pseudo_pop INFO:  Finished compiling pseudo population  (Pseudo population data size: 460)
  2023-05-03 13:05:07.962657 gannet.stats.ox.ac.uk 1535923 CausalGPS generate_pseudo_pop WARN:  Effective sample size is less than recommended.Current: 22.7748385392029, recommended min value: 46.
  [ FAIL 5 | WARN 88 | SKIP 0 | PASS 205 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-compile_pseudo_pop.R:65:3'): Compiling pseudo pop works as expected. ──
  mean(pseudo_pop_2$counter_weight) not equal to 0.7465975.
  1/1 mismatches
  [1] 0.746 - 0.747 == -0.000738
  ── Failure ('test-compute_density.R:10:3'): compute_density works ──────────────
  cd[10] not equal to 0.537411.
  1/1 mismatches
  [1] 0.537 - 0.537 == -0.000478
  ── Failure ('test-estimate_npmetric_erf.R:34:3'): estimate_npmetric_erf works as expected ──
  res$risk_val[1] not equal to 1305125.
  1/1 mismatches
  [1] 1304486 - 1305125 == -639
  ── Failure ('test-estimate_npmetric_erf.R:74:3'): estimate_npmetric_erf works as expected (with earth) ──
  res$risk_val[1] not equal to 1305125.
  1/1 mismatches
  [1] 1304486 - 1305125 == -639
  ── Failure ('test-generate_pseudo_pop.R:248:3'): generate_pseudo_pop works as expected. ──
  ps_pop3$adjusted_corr_results$mean_absolute_corr not equal to 0.3750209.
  1/1 mismatches
  [1] 0.375 - 0.375 == -1.21e-06
  
  [ FAIL 5 | WARN 88 | SKIP 0 | PASS 205 ]
  Error: Test failures
  Execution halted