Running ‘testthat.R’ [17s/22s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv(OMP_THREAD_LIMIT = 2)
  > 
  > library(testthat)
  > library(accessibility)
  > 
  > test_check("accessibility")
  Saving _problems/test-concentration_index-77.R
  Saving _problems/test-concentration_index-94.R
  Saving _problems/test-concentration_index-132.R
  Saving _problems/test-concentration_index-162.R
  Saving _problems/test-concentration_index-215.R
  Saving _problems/test-cost_to_closest-108.R
  Saving _problems/test-cost_to_closest-152.R
  Saving _problems/test-cost_to_closest-260.R
  Saving _problems/test-cost_to_closest-292.R
  Saving _problems/test-floating_catchment_area-91.R
  Saving _problems/test-floating_catchment_area-95.R
  Saving _problems/test-floating_catchment_area-112.R
  Saving _problems/test-floating_catchment_area-148.R
  Saving _problems/test-floating_catchment_area-165.R
  Saving _problems/test-floating_catchment_area-203.R
  Saving _problems/test-floating_catchment_area-227.R
  Saving _problems/test-floating_catchment_area-251.R
  Saving _problems/test-floating_catchment_area-264.R
  Saving _problems/test-floating_catchment_area-307.R
  Saving _problems/test-gini_index-49.R
  Saving _problems/test-gini_index-66.R
  Saving _problems/test-gini_index-98.R
  Saving _problems/test-gini_index-121.R
  Saving _problems/test-gini_index-154.R
  Saving _problems/test-spatial_availability-98.R
  Saving _problems/test-spatial_availability-102.R
  Saving _problems/test-spatial_availability-116.R
  Saving _problems/test-spatial_availability-152.R
  Saving _problems/test-spatial_availability-169.R
  Saving _problems/test-spatial_availability-207.R
  Saving _problems/test-spatial_availability-220.R
  Saving _problems/test-spatial_availability-272.R
  Saving _problems/test-spatial_availability-293.R
  Saving _problems/test-spatial_availability-308.R
  Saving _problems/test-spatial_availability-312.R
  Saving _problems/test-theil_t-71.R
  Saving _problems/test-theil_t-77.R
  Saving _problems/test-theil_t-109.R
  Saving _problems/test-theil_t-198.R
  Saving _problems/test-theil_t-222.R
  Saving _problems/test-theil_t-295.R
  Saving _problems/test-theil_t-326.R
  Saving _problems/test-theil_t-345.R
  Saving _problems/test-theil_t-379.R
  Saving _problems/test-theil_t-402.R
  Saving _problems/test-theil_t-435.R
  [ FAIL 46 | WARN 0 | SKIP 0 | PASS 763 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-concentration_index.R:77:3'): returns a dataframe with same class as accessibility_data's ──
  Error in ``[.data.table`(data, , `:=`(pop_share, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-concentration_index.R:77:3
   2.   └─accessibility::concentration_index(...) at test-concentration_index.R:11:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-concentration_index.R:94:3'): result has correct structure ─────
  Error in ``[.data.table`(data, , `:=`(pop_share, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-concentration_index.R:94:3
   2.   └─accessibility::concentration_index(...) at test-concentration_index.R:11:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-concentration_index.R:132:3'): input data sets remain unchanged ──
  Error in ``[.data.table`(data, , `:=`(pop_share, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(type = "standard") at test-concentration_index.R:132:3
   2.   └─accessibility::concentration_index(...) at test-concentration_index.R:11:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-concentration_index.R:162:3'): concentration index is correctly calculated ──
  Error in ``[.data.table`(data, , `:=`(pop_share, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(access_data, type = "standard") at test-concentration_index.R:162:3
   2.   └─accessibility::concentration_index(...) at test-concentration_index.R:11:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-concentration_index.R:215:3'): works even if access_data and sociodem_data has specific colnames ──
  Error in ``[.data.table`(data, , `:=`(pop_share, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(access_data) at test-concentration_index.R:215:3
   2.   └─accessibility::concentration_index(...) at test-concentration_index.R:11:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-cost_to_closest.R:108:3'): result has correct structure ────────
  Error in ``[.data.table`(opport_cumsum, , `:=`(cum_opport, cumsum(get(.opportunity_colname))), by = eval(groups, envir = env))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(n = c(1, 2)) at test-cost_to_closest.R:108:3
   2.   └─accessibility::cost_to_closest(...) at test-cost_to_closest.R:14:3
   3.     └─base::lapply(...)
   4.       └─accessibility (local) FUN(X[[i]], ...)
   5.         └─accessibility:::calculate_cost(...)
   6.           ├─...[]
   7.           └─data.table:::`[.data.table`(...)
  ── Error ('test-cost_to_closest.R:152:3'): result columns are ordered correctly when length(n)>1 ──
  Error in ``[.data.table`(opport_cumsum, , `:=`(cum_opport, cumsum(get(.opportunity_colname))), by = eval(groups, envir = env))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(n = c(1, 3)) at test-cost_to_closest.R:152:3
   2.   └─accessibility::cost_to_closest(...) at test-cost_to_closest.R:14:3
   3.     └─base::lapply(...)
   4.       └─accessibility (local) FUN(X[[i]], ...)
   5.         └─accessibility:::calculate_cost(...)
   6.           ├─...[]
   7.           └─data.table:::`[.data.table`(...)
  ── Error ('test-cost_to_closest.R:260:3'): output is as expected when ids are missing - n>1 ──
  Error in ``[.data.table`(opport_cumsum, , `:=`(cum_opport, cumsum(get(.opportunity_colname))), by = eval(groups, envir = env))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(smaller_travel_matrix, n = c(1, 3)) at test-cost_to_closest.R:260:3
   2.   └─accessibility::cost_to_closest(...) at test-cost_to_closest.R:14:3
   3.     └─base::lapply(...)
   4.       └─accessibility (local) FUN(X[[i]], ...)
   5.         └─accessibility:::calculate_cost(...)
   6.           ├─...[]
   7.           └─data.table:::`[.data.table`(...)
  ── Error ('test-cost_to_closest.R:292:3'): output is as expected when ids are missing - length(n)>1 ──
  Error in ``[.data.table`(opport_cumsum, , `:=`(cum_opport, cumsum(get(.opportunity_colname))), by = eval(groups, envir = env))`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(smaller_travel_matrix, n = 3) at test-cost_to_closest.R:292:3
   2.   └─accessibility::cost_to_closest(...) at test-cost_to_closest.R:14:3
   3.     └─base::lapply(...)
   4.       └─accessibility (local) FUN(X[[i]], ...)
   5.         └─accessibility:::calculate_cost(...)
   6.           ├─...[]
   7.           └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:91:3'): throws warning if travel_matrix extra col ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(tester(group_by = character(0))) at test-floating_catchment_area.R:91:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─accessibility (local) tester(group_by = character(0))
    7.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
    8.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
    9.       ├─...[]
   10.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:95:3'): returns a dataframe whose class is the same as travel_matrix's ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-floating_catchment_area.R:95:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:112:3'): result has correct structure ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-floating_catchment_area.R:112:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:148:3'): input data sets remain unchanged ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-floating_catchment_area.R:148:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:165:3'): fill_missing_ids arg works correctly ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(small_travel_matrix, fill_missing_ids = TRUE) at test-floating_catchment_area.R:165:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:203:3'): accepts custom decay function ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(smaller_travel_matrix, decay_function = custom_function) at test-floating_catchment_area.R:203:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:227:3'): calculates 2sfca correctly ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(smaller_travel_matrix, method = "2sfca") at test-floating_catchment_area.R:227:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:251:3'): calculates bfca correctly ───
  Error in ``[.data.table`(data, , `:=`(balanced_opp_weight_i, opp_weight/sum(opp_weight)), by = c("from_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(smaller_travel_matrix, method = "bfca") at test-floating_catchment_area.R:251:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:264:3'): works even if travel_matrix and land_use has specific colnames ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-floating_catchment_area.R:264:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-floating_catchment_area.R:304:3'): results are grouped by decay_function_arg when needed ──
  Error in ``[.data.table`(data, , `:=`(pop_served, sum(get(.demand_colname) * opp_weight, na.rm = TRUE)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(...) at test-floating_catchment_area.R:304:3
   2.   └─accessibility::floating_catchment_area(...) at test-floating_catchment_area.R:15:3
   3.     └─accessibility (local) fca_function(data, opportunity, demand, setdiff(groups, "from_id"))
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-gini_index.R:49:3'): returns a dataframe with same class as accessibility_data's ──
  Error in ``[.data.table`(data, , `:=`(.prop_pop, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-gini_index.R:49:3
   2.   └─accessibility::gini_index(...) at test-gini_index.R:9:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-gini_index.R:66:3'): result has correct structure ──────────────
  Error in ``[.data.table`(data, , `:=`(.prop_pop, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-gini_index.R:66:3
   2.   └─accessibility::gini_index(...) at test-gini_index.R:9:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-gini_index.R:98:3'): input data sets remain unchanged ──────────
  Error in ``[.data.table`(data, , `:=`(.prop_pop, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-gini_index.R:98:3
   2.   └─accessibility::gini_index(...) at test-gini_index.R:9:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-gini_index.R:121:3'): gini index is correctly calculated ───────
  Error in ``[.data.table`(data, , `:=`(.prop_pop, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(access_data) at test-gini_index.R:121:3
   2.   └─accessibility::gini_index(...) at test-gini_index.R:9:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-gini_index.R:154:3'): works even if access_data and sociodem_data has specific colnames ──
  Error in ``[.data.table`(data, , `:=`(.prop_pop, get(.pop_colname)/sum(get(.pop_colname))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(access_data) at test-gini_index.R:154:3
   2.   └─accessibility::gini_index(...) at test-gini_index.R:9:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:98:3'): throws warning if travel_matrix has extra col ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(tester(group_by = character(0))) at test-spatial_availability.R:98:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─accessibility (local) tester(group_by = character(0))
   7.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   8.     ├─...[]
   9.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:102:3'): returns a dataframe whose class is the same as travel_matrix's ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-spatial_availability.R:102:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:116:3'): result has correct structure ───
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-spatial_availability.R:116:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:152:3'): input data sets remain unchanged ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-spatial_availability.R:152:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:169:3'): fill_missing_ids arg works correctly ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(small_travel_matrix, fill_missing_ids = TRUE) at test-spatial_availability.R:169:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:207:3'): accepts custom decay function ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(smaller_travel_matrix, decay_function = custom_function) at test-spatial_availability.R:207:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:220:3'): works even if smaller_matrix and land_use has specific colnames ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-spatial_availability.R:220:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:268:3'): calculates spatial availability correctly ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 7/7 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(paper_travel_matrix, paper_land_use_data, group_by = character(0)) at test-spatial_availability.R:268:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:290:3'): results are grouped by decay_function_arg when needed ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 9/9 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(...) at test-spatial_availability.R:290:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:308:3'): throws warning w/ fill_missing_ids = FALSE with detailed_results ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(tester(fill_missing_ids = FALSE, detailed_results = TRUE)) at test-spatial_availability.R:308:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─accessibility (local) tester(fill_missing_ids = FALSE, detailed_results = TRUE)
   7.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   8.     ├─...[]
   9.     └─data.table:::`[.data.table`(...)
  ── Error ('test-spatial_availability.R:312:3'): result has correct structure with detailed_results = TRUE ──
  Error in ``[.data.table`(data, , `:=`(impedance_bal_fac, opp_weight/sum(opp_weight)), by = c("to_id", group_by))`: attempt access index 8/8 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(detailed_results = TRUE) at test-spatial_availability.R:312:3
   2.   └─accessibility::spatial_availability(...) at test-spatial_availability.R:16:3
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:71:3'): throws warning if accessibility_data has an extra col ──
  Error in ``[.data.table`(data, , `:=`(group_avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .socioecon_groups)`: attempt access index 6/6 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(tester(group_by = character(0))) at test-theil_t.R:71:3
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. └─accessibility (local) tester(group_by = character(0))
    7.   └─accessibility::theil_t(...) at test-theil_t.R:13:3
    8.     └─accessibility:::theil_with_groups(...)
    9.       ├─...[]
   10.       └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:77:3'): returns dataframes with same class as accessibility_data's ──
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-theil_t.R:77:3
   2.   └─accessibility::theil_t(...) at test-theil_t.R:13:3
   3.     └─accessibility:::theil_with_groups(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:109:3'): result has correct structure ────────────────
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-theil_t.R:109:3
   2.   └─accessibility::theil_t(...) at test-theil_t.R:13:3
   3.     └─accessibility:::theil_with_groups(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:198:3'): input data sets remain unchanged ────────────
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester() at test-theil_t.R:198:3
   2.   └─accessibility::theil_t(...) at test-theil_t.R:13:3
   3.     └─accessibility:::theil_with_groups(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:222:3'): theil t is correctly calculated ─────────────
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(access_data) at test-theil_t.R:222:3
   2.   └─accessibility::theil_t(...) at test-theil_t.R:13:3
   3.     └─accessibility:::theil_with_groups(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:295:3'): works even if access_data and sociodem_data has specific colnames ──
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 5/5 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) tester(access_data) at test-theil_t.R:295:3
   2.   └─accessibility::theil_t(...) at test-theil_t.R:13:3
   3.     └─accessibility:::theil_with_groups(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:326:3'): returns dataframes with same class as accessibility_data's ──
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) null_tester() at test-theil_t.R:326:3
   2.   └─accessibility (local) tester(..., socioeconomic_groups = NULL) at test-theil_t.R:323:16
   3.     └─accessibility::theil_t(...) at test-theil_t.R:13:3
   4.       └─accessibility:::theil_without_groups(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:345:3'): result has correct structure ────────────────
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) null_tester() at test-theil_t.R:345:3
   2.   └─accessibility (local) tester(..., socioeconomic_groups = NULL) at test-theil_t.R:323:16
   3.     └─accessibility::theil_t(...) at test-theil_t.R:13:3
   4.       └─accessibility:::theil_without_groups(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:379:3'): input data sets remain unchanged ────────────
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) null_tester() at test-theil_t.R:379:3
   2.   └─accessibility (local) tester(..., socioeconomic_groups = NULL) at test-theil_t.R:323:16
   3.     └─accessibility::theil_t(...) at test-theil_t.R:13:3
   4.       └─accessibility:::theil_without_groups(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:402:3'): theil t is correctly calculated ─────────────
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) null_tester(access_data) at test-theil_t.R:402:3
   2.   └─accessibility (local) tester(..., socioeconomic_groups = NULL) at test-theil_t.R:323:16
   3.     └─accessibility::theil_t(...) at test-theil_t.R:13:3
   4.       └─accessibility:::theil_without_groups(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  ── Error ('test-theil_t.R:435:3'): works even if access_data and sociodem_data has specific colnames ──
  Error in ``[.data.table`(data, , `:=`(avg_access, stats::weighted.mean(get(..opportunity), w = get(..population))), by = .groups)`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─accessibility (local) null_tester(access_data) at test-theil_t.R:435:3
   2.   └─accessibility (local) tester(..., socioeconomic_groups = NULL) at test-theil_t.R:323:16
   3.     └─accessibility::theil_t(...) at test-theil_t.R:13:3
   4.       └─accessibility:::theil_without_groups(...)
   5.         ├─...[]
   6.         └─data.table:::`[.data.table`(...)
  
  [ FAIL 46 | WARN 0 | SKIP 0 | PASS 763 ]
  Error:
  ! Test failures.
  Execution halted