Running ‘exporting-methods.R’ [3s/4s]
  Running ‘testthat.R’ [17s/27s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(optmatch)
  Loading required package: survival
  The optmatch package has an academic license. Enter relaxinfo() for more information.
  > 
  > test_check("optmatch")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • empty test (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test.Optmatch.R:49:3): Subsetting preserves subproblem ───────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(pr ~ cost, data = nuclearplants) test.Optmatch.R:49:2
   2. └─optmatch:::fullmatch.default(pr ~ cost, data = nuclearplants)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:123:3): Subsetting drops any matched.distances attributes ──
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, min.controls = min.controls, 
      max.controls = max.controls, omit.fraction = omit.fraction, 
      mean.controls = mean.controls, tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.Optmatch.R:123:2
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.Optmatch.R:146:3): Summary properly handles matched.distances #106 ──
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(dist, data = nuclearplants) test.Optmatch.R:146:2
   2. └─optmatch:::pairmatch.matrix(dist, data = nuclearplants)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:206:3): Indicating failing subproblems ───────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test.Optmatch.R:206:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(pr ~ t1, data = nuclearplants, min = 5, max = 5)
   7. └─optmatch:::fullmatch.default(...)
   8.   ├─optmatch::fullmatch(...)
   9.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:252:3): optmatch_restrictions ────────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(res.b, data = d)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(res.b, data = d) test.Optmatch.R:252:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(res.b, data = d)
  ── Error (test.Optmatch.R:295:3): optmatch_same_distance ───────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(res.b, data = d)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(res.b, data = d) test.Optmatch.R:295:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(res.b, data = d)
  ── Error (test.Optmatch.R:320:3): update.optmatch basics ───────────────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(z ~ b, data = d) test.Optmatch.R:320:2
   2. └─optmatch:::fullmatch.default(z ~ b, data = d)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:331:3): update without changing distance ─────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(z ~ b, data = d) test.Optmatch.R:331:2
   2. └─optmatch:::fullmatch.default(z ~ b, data = d)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:361:3): upadate passing a different distance as x argument ──
  Error in `fullmatch.matrix(res.b1, data = d1)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(res.b1, data = d1) test.Optmatch.R:361:2
   2. └─optmatch:::fullmatch.matrix(res.b1, data = d1)
  ── Error (test.Optmatch.R:402:3): update when distance is changed outside of update ──
  Error in `fullmatch.matrix(res.c, data = d1)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(res.c, data = d1) test.Optmatch.R:402:2
   2. └─optmatch:::fullmatch.matrix(res.c, data = d1)
  ── Error (test.Optmatch.R:425:3): Update arguments change be ordered differently ──
  Error in `fullmatch.matrix(data = d1, x = res.c)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(data = d1, x = res.c) test.Optmatch.R:425:2
   2. └─optmatch:::fullmatch.matrix(data = d1, x = res.c)
  ── Error (test.Optmatch.R:435:3): Update supporting new formula ────────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(pr ~ cost, data = nuclearplants) test.Optmatch.R:435:2
   2. └─optmatch:::fullmatch.default(pr ~ cost, data = nuclearplants)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:448:3): update warning for implicit distance changes ──
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(pr ~ cap, data = nuclearplants) test.Optmatch.R:448:2
   2. └─optmatch:::pairmatch.default(pr ~ cap, data = nuclearplants)
   3.   ├─optmatch::pairmatch(...)
   4.   └─optmatch:::pairmatch.matrix(...)
   5.     ├─optmatch::fullmatch(...)
   6.     └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:471:3): update producing errors properly ─────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(pr ~ cost, data = nuclearplants) test.Optmatch.R:471:2
   2. └─optmatch:::fullmatch.default(pr ~ cost, data = nuclearplants)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:535:3): equality of matches ──────────────────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(pr ~ cost, data = nuclearplants) test.Optmatch.R:535:2
   2. └─optmatch:::fullmatch.default(pr ~ cost, data = nuclearplants)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:630:3): combining optmatch objects ───────────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.Optmatch.R:630:2
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.Optmatch.R:770:3): combining already blocked matches ────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.Optmatch.R:770:2
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.SubDivStrat.R:71:3): NA is true, not string ─────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, min.controls = min.controls, 
      max.controls = max.controls, omit.fraction = omit.fraction, 
      mean.controls = mean.controls, tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test.SubDivStrat.R:71:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(...)
   7. └─optmatch:::fullmatch.default(...)
   8.   ├─optmatch::fullmatch(...)
   9.   └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.exactMatch.R:156:3): Contains grouping information ──────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(res.em, data = d)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(res.em, data = d) test.exactMatch.R:156:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(res.em, data = d)
  ── Error (test.feasible.R:23:3): Problems bigger than the max are not feasible ──
  Error in `fullmatch.matrix(largeButFeasible, data = data.frame(1:30))`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(largeButFeasible, data = data.frame(1:30)) test.feasible.R:23:2
   2. └─optmatch:::fullmatch.matrix(largeButFeasible, data = data.frame(1:30))
  ── Error (test.fullmatch.R:54:3): No cross strata matches ──────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(distances, data = d)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(distances, data = d) test.fullmatch.R:54:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(distances, data = d)
  ── Error (test.fullmatch.R:64:3): Basic Matches ────────────────────────────────
  Error in `fullmatch.matrix(dist, data = d)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(dist, data = d) test.fullmatch.R:64:2
   2. └─optmatch:::fullmatch.matrix(dist, data = d)
  ── Error (test.fullmatch.R:161:3): Reversion Test: Fullmatch handles omit.fraction for matrices ──
  Error in `fullmatch.matrix(A, min.controls = 1, max.controls = 1, omit.fraction = 0.5, 
      data = data.frame(1:7))`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.fullmatch.R:161:2
   2. └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:183:3): Reversion Test: Proper labeling of NAs ──────
  Error in `fullmatch.InfinitySparseMatrix(Ai, data = data.frame(1:7))`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(Ai, data = data.frame(1:7)) test.fullmatch.R:183:2
   2. └─optmatch:::fullmatch.InfinitySparseMatrix(Ai, data = data.frame(1:7))
  ── Error (test.fullmatch.R:218:3): Results are in 'data order' ─────────────────
  Error in `fullmatch.matrix(m, data = df)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(m, data = df) test.fullmatch.R:218:2
   2. └─optmatch:::fullmatch.matrix(m, data = df)
  ── Error (test.fullmatch.R:276:3): full() and pair() are alises to _match functions ──
  Error in `fullmatch.matrix(dists, data = test.data)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_equivalent(...) test.fullmatch.R:276:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─optmatch::fullmatch(dists, data = test.data)
   5. └─optmatch:::fullmatch.matrix(dists, data = test.data)
  ── Error (test.fullmatch.R:291:3): fullmatch UI cleanup ────────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, data = test.data)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(m, data = test.data) test.fullmatch.R:291:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(m, data = test.data)
  ── Error (test.fullmatch.R:383:3): NAs in irrelevant data slots don't trip us up ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test.fullmatch.R:383:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─optmatch::fullmatch(Z ~ X1, data = test.data)
   5. └─optmatch:::fullmatch.default(Z ~ X1, data = test.data)
   6.   ├─optmatch::fullmatch(...)
   7.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:389:3): Using strata instead of within arguments ────
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, min.controls = min.controls, 
      max.controls = max.controls, omit.fraction = omit.fraction, 
      mean.controls = mean.controls, tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.fullmatch.R:389:2
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.fullmatch.R:423:3): strata in GLMs ──────────────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, min.controls = min.controls, 
      max.controls = max.controls, omit.fraction = omit.fraction, 
      mean.controls = mean.controls, tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.fullmatch.R:423:2
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.fullmatch.R:482:3): matched.distances attr removed per #57 ──────
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, min.controls = min.controls, 
      max.controls = max.controls, omit.fraction = omit.fraction, 
      mean.controls = mean.controls, tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.fullmatch.R:482:2
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.fullmatch.R:505:3): #123: Supporting NA's in treatment, fullmatch.formula ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(z ~ x, data = data) test.fullmatch.R:505:2
   2. └─optmatch:::fullmatch.default(z ~ x, data = data)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:534:3): #123: Supporting NA's in treatment, fullmatch.numeric ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(x, z = z, data = data) test.fullmatch.R:534:2
   2. └─optmatch:::fullmatch.numeric(x, z = z, data = data)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:572:3): #123: Supporting NA's in treatment, fullmatch.function ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: dimnames of argument 'x' contain duplicates
  Backtrace:
      █
   1. ├─optmatch::fullmatch(sdiffs, z = data$z, data = data) test.fullmatch.R:572:2
   2. └─optmatch:::fullmatch.default(sdiffs, z = data$z, data = data)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:596:3): #123: Supporting NA's in treatment, fullmatch.glm/bigglm ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(mod) test.fullmatch.R:596:2
   2. └─optmatch:::fullmatch.default(mod)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:630:5): symmetry w.r.t. structural requirements (#132) ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(z ~ x, min.c = 2, max.c = 2, data = data) test.fullmatch.R:630:4
   2. └─optmatch:::fullmatch.default(z ~ x, min.c = 2, max.c = 2, data = data)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:645:5): Problems w/ fewer controls than treatment don't break mean.controls ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.fullmatch.R:645:4
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:670:5): accept negative omit.fraction ───────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.fullmatch.R:670:4
   2. └─optmatch:::fullmatch.default(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.R:683:3): If matching fails, we should give a warning ──
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test.fullmatch.R:683:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(...)
   7. └─optmatch:::fullmatch.default(...)
   8.   ├─optmatch::fullmatch(...)
   9.   └─optmatch:::fullmatch.matrix(...)
  ── Failure (test.fullmatch.infeasible.recovery.R:19:3): Invalid mean.controls input ──
  `fullmatch(m, data = nuclearplants, mean.controls = 23/10)` threw an error with unexpected message.
  Expected match: "mean.controls cannot be larger than the ratio of number of controls to treatments"
  Actual message: "Some elements of the distance matrix are not found in the data argument."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test.fullmatch.infeasible.recovery.R:19:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(m, data = nuclearplants, mean.controls = 23/10)
   7. └─optmatch:::fullmatch.matrix(m, data = nuclearplants, mean.controls = 23/10)
  ── Failure (test.fullmatch.infeasible.recovery.R:23:3): Invalid mean.controls input ──
  `fullmatch(m, data = nuclearplants, mean.controls = 1, min.controls = 2)` threw an error with unexpected message.
  Expected match: "mean.controls cannot be smaller than min.controls"
  Actual message: "Some elements of the distance matrix are not found in the data argument."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test.fullmatch.infeasible.recovery.R:23:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(...)
   7. └─optmatch:::fullmatch.matrix(...)
  ── Failure (test.fullmatch.infeasible.recovery.R:25:3): Invalid mean.controls input ──
  `fullmatch(m, data = nuclearplants, mean.controls = 1, max.controls = 1/2)` threw an error with unexpected message.
  Expected match: "mean.controls cannot be larger than max.controls"
  Actual message: "Some elements of the distance matrix are not found in the data argument."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test.fullmatch.infeasible.recovery.R:25:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(...)
   7. └─optmatch:::fullmatch.matrix(...)
  ── Failure (test.fullmatch.infeasible.recovery.R:36:3): Invalid mean.controls input ──
  `fullmatch(mm, data = dd, mean.controls = 1.5)` threw an error with unexpected message.
  Expected match: "mean.controls cannot be larger than the ratio of number of controls to treatments"
  Actual message: "Some elements of the distance matrix are not found in the data argument."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test.fullmatch.infeasible.recovery.R:36:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(mm, data = dd, mean.controls = 1.5)
   7. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Failure (test.fullmatch.infeasible.recovery.R:38:3): Invalid mean.controls input ──
  `fullmatch(mm, data = dd, mean.controls = c(2, NA, 2))` threw an error with unexpected message.
  Expected match: "mean.controls cannot be larger than the ratio of number of controls to treatments"
  Actual message: "Some elements of the distance matrix are not found in the data argument."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test.fullmatch.infeasible.recovery.R:38:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(mm, data = dd, mean.controls = c(2, NA, 2))
   7. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.fullmatch.infeasible.recovery.R:46:3): mean.controls should do the same as omit.fraction ──
  Error in `fullmatch.matrix(m, data = nuclearplants, omit.fraction = 1/2)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(m, data = nuclearplants, omit.fraction = 1/2) test.fullmatch.infeasible.recovery.R:46:2
   2. └─optmatch:::fullmatch.matrix(m, data = nuclearplants, omit.fraction = 1/2)
  ── Error (test.fullmatch.infeasible.recovery.R:80:3): Allow passing all NA to mean.controls or omit.fraction ──
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, data = nuclearplants)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(m, data = nuclearplants) test.fullmatch.infeasible.recovery.R:80:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(m, data = nuclearplants)
  ── Error (test.fullmatch.infeasible.recovery.R:129:3): Correctly apply max.controls ──
  Error in `fullmatch.BlockedInfinitySparseMatrix(mm, data = dd)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::stratumStructure(f <- fullmatch(mm, data = dd)) test.fullmatch.infeasible.recovery.R:129:2
   2. ├─optmatch::fullmatch(mm, data = dd)
   3. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(mm, data = dd)
  ── Error (test.fullmatch.infeasible.recovery.R:163:3): Omits occur only on controls ──
  Error in `fullmatch.BlockedInfinitySparseMatrix(mm, data = dd, max.controls = 2)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test.fullmatch.infeasible.recovery.R:163:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::stratumStructure(fullmatch(mm, data = dd, max.controls = 2))
   7. ├─optmatch::fullmatch(mm, data = dd, max.controls = 2)
   8. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.fullmatch.infeasible.recovery.R:192:3): If omit.fraction is included ──
  Error in `fullmatch.BlockedInfinitySparseMatrix(mm, data = dd, omit.fraction = c(1/5, 
      1/3, 1/5))`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(...) test.fullmatch.infeasible.recovery.R:192:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.fullmatch.infeasible.recovery.R:210:3): Suggested omit.fraction can be used ──
  Error in `fullmatch.matrix(mm, data = nuclearplants, max.controls = 2)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test.fullmatch.infeasible.recovery.R:210:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(mm, data = nuclearplants, max.controls = 2)
   7. └─optmatch:::fullmatch.matrix(mm, data = nuclearplants, max.controls = 2)
  ── Error (test.fullmatch.infeasible.recovery.R:226:3): mean.controls as fraction ──
  Error in `fullmatch.matrix(mm, data = nuclearplants, mean.controls = 1.9, 
      max.controls = 3)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::stratumStructure(...) test.fullmatch.infeasible.recovery.R:226:2
   2. ├─optmatch::fullmatch(...)
   3. └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.infeasible.recovery.R:240:3): attr saved after recovery ──
  Error in `fullmatch.matrix(mm, data = nuclearplants, max.controls = 3)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(mm, data = nuclearplants, max.controls = 3) test.fullmatch.infeasible.recovery.R:240:2
   2. └─optmatch:::fullmatch.matrix(mm, data = nuclearplants, max.controls = 3)
  ── Error (test.fullmatch.infeasible.recovery.R:302:3): fullmatch_try_recovery ──
  Error in `fullmatch.matrix(mm, data = nuclearplants, max.controls = 2)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
       █
    1. ├─testthat::expect_warning(...) test.fullmatch.infeasible.recovery.R:302:2
    2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─testthat::expect_true(...)
    7. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    8. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    9. ├─optmatch::fullmatch(mm, data = nuclearplants, max.controls = 2)
   10. └─optmatch:::fullmatch.matrix(mm, data = nuclearplants, max.controls = 2)
  ── Error (test.fullmatch.infeasible.recovery.R:320:3): n_t > n_c ───────────────
  Error in `fullmatch.matrix(m, data = nuclearplants)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_true(any(!is.na(fullmatch(m, data = nuclearplants)))) test.fullmatch.infeasible.recovery.R:320:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─optmatch::fullmatch(m, data = nuclearplants)
   5. └─optmatch:::fullmatch.matrix(m, data = nuclearplants)
  ── Error (test.fullmatch.infeasible.recovery.R:331:3): Issue #92 ───────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
       █
    1. ├─testthat::expect_that(...) test.fullmatch.infeasible.recovery.R:331:2
    2. │ └─testthat:::condition(object)
    3. │   └─testthat::expect_warning(x, regexp = regexp, all = all, ...)
    4. │     └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
    5. │       ├─testthat:::.capture(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    8. ├─optmatch::fullmatch(z ~ x, data = d, min = 1, max = 5)
    9. └─optmatch:::fullmatch.default(z ~ x, data = d, min = 1, max = 5)
   10.   ├─optmatch::fullmatch(...)
   11.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.fullmatch.old.R:20:3): fullmatch function, old version ──────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(mhd2, data = nuclearplants)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(mhd2, data = nuclearplants) test.fullmatch.old.R:20:2
   2. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(mhd2, data = nuclearplants)
  ── Failure (test.makedist.R:47:3): No within => dense matrix ───────────────────
  `res.df` not equal to `res`.
  Attributes: < Component "dimnames": Component "treatment": 'is.NA' value mismatch: 0 in current 8 in target >
  Attributes: < Component "dimnames": Component "control": 'is.NA' value mismatch: 0 in current 3 in target >
  'is.NA' value mismatch: 0 in current 40 in target
  ── Failure (test.makedist.R:48:3): No within => dense matrix ───────────────────
  as.matrix(res.df) not equivalent to `m`.
  40/40 mismatches (average diff: NaN)
  [1] NA - 1 == NA
  [2] NA - 2 == NA
  [3] NA - 3 == NA
  [4] NA - 4 == NA
  [5] NA - 5 == NA
  [6] NA - 6 == NA
  [7] NA - 7 == NA
  [8] NA - 8 == NA
  [9] NA - 0 == NA
  ...
  ── Error (test.makedist.R:68:3): Mask => ISM result ────────────────────────────
  Error in `makedist(data$z, data, yminus, within = test.within)`: Row and column names of within must match those of the data.
  Backtrace:
      █
   1. └─optmatch:::makedist(data$z, data, yminus, within = test.within) test.makedist.R:68:2
  ── Failure (test.makedist.R:108:3): makedist works on single column data.frames ──
  all(res != 0) is not TRUE
  
  `actual`:   <NA>
  `expected`: TRUE
  ── Failure (test.match_on.R:226:3): Distances from functions ───────────────────
  mean(result.function) not equal to 2.
  1/1 mismatches
  [1] NA - 2 == NA
  ── Failure (test.match_on.R:883:3): #123: Supporting NA's in treatment, match_on.function ──
  colnames(m) not equal to rownames(data)[1:5][!is.na(data$z[1:5])].
  5/5 mismatches
  x[1]: "z"
  y[1]: "1"
  
  x[2]: "x"
  y[2]: "2"
  
  x[3]: NA
  y[3]: "3"
  
  x[4]: NA
  y[4]: "4"
  
  x[5]: NA
  y[5]: "5"
  ── Failure (test.match_on.R:884:3): #123: Supporting NA's in treatment, match_on.function ──
  rownames(m) not equal to rownames(data)[6:10][!is.na(data$z[6:10])].
  5/5 mismatches
  x[1]: NA
  y[1]: "6"
  
  x[2]: NA
  y[2]: "7"
  
  x[3]: NA
  y[3]: "8"
  
  x[4]: NA
  y[4]: "9"
  
  x[5]: NA
  y[5]: "10"
  ── Failure (test.match_on.R:890:3): #123: Supporting NA's in treatment, match_on.function ──
  colnames(m) not equal to rownames(data)[1:5][!is.na(data$z[1:5])].
  4/4 mismatches
  x[1]: "z"
  y[1]: "2"
  
  x[2]: "x"
  y[2]: "3"
  
  x[3]: NA
  y[3]: "4"
  
  x[4]: NA
  y[4]: "5"
  ── Failure (test.match_on.R:891:3): #123: Supporting NA's in treatment, match_on.function ──
  rownames(m) not equal to rownames(data)[6:10][!is.na(data$z[6:10])].
  5/5 mismatches
  x[1]: NA
  y[1]: "6"
  
  x[2]: NA
  y[2]: "7"
  
  x[3]: NA
  y[3]: "8"
  
  x[4]: NA
  y[4]: "9"
  
  x[5]: NA
  y[5]: "10"
  ── Failure (test.match_on.R:897:3): #123: Supporting NA's in treatment, match_on.function ──
  colnames(m) not equal to rownames(data)[1:5][!is.na(data$z[1:5])].
  2/2 mismatches
  x[1]: "z"
  y[1]: "3"
  
  x[2]: "x"
  y[2]: "4"
  ── Failure (test.match_on.R:898:3): #123: Supporting NA's in treatment, match_on.function ──
  rownames(m) not equal to rownames(data)[6:10][!is.na(data$z[6:10])].
  3/3 mismatches
  x[1]: NA
  y[1]: "8"
  
  x[2]: NA
  y[2]: "9"
  
  x[3]: NA
  y[3]: "10"
  ── Error (test.maxControlsCap.old.R:11:3): maxControlsCap ──────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(mhd2a.caliper, data = nuclearplants)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::stratumStructure(fullmatch(mhd2a.caliper, data = nuclearplants)) test.maxControlsCap.old.R:11:2
   2. ├─optmatch::fullmatch(mhd2a.caliper, data = nuclearplants)
   3. └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.optimality.R:11:5): Simple example with and without calipers ────
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(m, data = x) test.optimality.R:11:4
   2. └─optmatch:::pairmatch.matrix(m, data = x)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:60:3): Omit fraction computed per subproblem ────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(x = x, min.controls = controls, 
      max.controls = controls, omit.fraction = omf, data = data, 
      ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(match_on(psm) + em, data = nuclearplants) test.pairmatch.R:60:2
   2. └─optmatch:::pairmatch.BlockedInfinitySparseMatrix(...)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.pairmatch.R:94:3): Compute omit fraction based on reachable treated units ──
  Error in `Ops.factor(p1, p2)`: level sets of factors are different
  Backtrace:
      █
   1. ├─testthat::expect_true(all(p1 == p2, na.rm = TRUE)) test.pairmatch.R:94:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::Ops.factor(p1, p2)
  ── Error (test.pairmatch.R:111:3): Pass additional arguments to fullmatch ──────
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(m, data = df) test.pairmatch.R:111:2
   2. └─optmatch:::pairmatch.matrix(m, data = df)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:136:3): pairmatch UI cleanup ────────────────────────
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(m, data = test.data) test.pairmatch.R:136:2
   2. └─optmatch:::pairmatch.matrix(m, data = test.data)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:245:3): NAs in irrelevant data slots don't trip us up ──
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_equal(...) test.pairmatch.R:245:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─optmatch::pairmatch(Z ~ X1, data = test.data)
   5. └─optmatch:::pairmatch.default(Z ~ X1, data = test.data)
   6.   ├─optmatch::pairmatch(...)
   7.   └─optmatch:::pairmatch.matrix(...)
   8.     ├─optmatch::fullmatch(...)
   9.     └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:252:3): matched.distances attr removed per #57 ──────
  Error in `fullmatch.BlockedInfinitySparseMatrix(x = x, min.controls = controls, 
      max.controls = controls, omit.fraction = omf, data = data, 
      ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(...) test.pairmatch.R:252:2
   2. └─optmatch:::pairmatch.default(...)
   3.   ├─optmatch::pairmatch(...)
   4.   └─optmatch:::pairmatch.BlockedInfinitySparseMatrix(...)
   5.     ├─optmatch::fullmatch(...)
   6.     └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.pairmatch.R:286:3): #123: Supporting NA's in treatment, pairmatch.formula ──
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(z ~ x, data = data) test.pairmatch.R:286:2
   2. └─optmatch:::pairmatch.default(z ~ x, data = data)
   3.   ├─optmatch::pairmatch(...)
   4.   └─optmatch:::pairmatch.matrix(...)
   5.     ├─optmatch::fullmatch(...)
   6.     └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:314:3): #123: Supporting NA's in treatment, pairmatch.numeric ──
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(x, z = z, data = data) test.pairmatch.R:314:2
   2. └─optmatch:::pairmatch.numeric(x, z = z, data = data)
   3.   ├─optmatch::pairmatch(...)
   4.   └─optmatch:::pairmatch.matrix(...)
   5.     ├─optmatch::fullmatch(...)
   6.     └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:359:3): #123: Supporting NA's in treatment, pairmatch.function ──
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: dimnames of argument 'x' contain duplicates
  Backtrace:
      █
   1. ├─optmatch::pairmatch(sdiffs, z = data$z, data = data) test.pairmatch.R:359:2
   2. └─optmatch:::pairmatch.default(sdiffs, z = data$z, data = data)
   3.   ├─optmatch::pairmatch(...)
   4.   └─optmatch:::pairmatch.matrix(...)
   5.     ├─optmatch::fullmatch(...)
   6.     └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:376:3): #123: Supporting NA's in treatment, pairmatch.glm/bigglm ──
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(mod) test.pairmatch.R:376:2
   2. └─optmatch:::pairmatch.default(mod)
   3.   ├─optmatch::pairmatch(...)
   4.   └─optmatch:::pairmatch.matrix(...)
   5.     ├─optmatch::fullmatch(...)
   6.     └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:398:3): #116: If nt>nc, try creating nc pairs ───────
  Error in `fullmatch.matrix(x = x, min.controls = controls, max.controls = controls, 
      omit.fraction = omf, data = data, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::pairmatch(z ~ x, data = data) test.pairmatch.R:398:2
   2. └─optmatch:::pairmatch.default(z ~ x, data = data)
   3.   ├─optmatch::pairmatch(...)
   4.   └─optmatch:::pairmatch.matrix(...)
   5.     ├─optmatch::fullmatch(...)
   6.     └─optmatch:::fullmatch.matrix(...)
  ── Error (test.pairmatch.R:409:3): If matching fails, we should give a warning ──
  Error in `fullmatch.InfinitySparseMatrix(x = x, min.controls = controls, 
      max.controls = controls, omit.fraction = omf, data = data, 
      ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test.pairmatch.R:409:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::pairmatch(m + caliper(m, 0.1), data = nuclearplants)
   7. └─optmatch:::pairmatch.InfinitySparseMatrix(...)
   8.   ├─optmatch::fullmatch(...)
   9.   └─optmatch:::fullmatch.InfinitySparseMatrix(...)
  ── Error (test.stratumStructure.old.R:26:3): stratumStructure old ──────────────
  Error in `fullmatch.matrix(psd, data = nuclearplants)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::stratumStructure(fullmatch(psd, data = nuclearplants)) test.stratumStructure.old.R:26:2
   2. ├─optmatch::fullmatch(psd, data = nuclearplants)
   3. └─optmatch:::fullmatch.matrix(psd, data = nuclearplants)
  ── Error (test.summary.optmatch.R:51:3): Failing subgroups ─────────────────────
  Error in `fullmatch.BlockedInfinitySparseMatrix(m, min.controls = min.controls, 
      max.controls = max.controls, omit.fraction = omit.fraction, 
      mean.controls = mean.controls, tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─testthat::expect_warning(...) test.summary.optmatch.R:51:2
   2. │ └─testthat:::quasi_capture(enquo(object), label, capture_warnings)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─optmatch::fullmatch(pr ~ cap + strata(pt), min.c = 2, data = np_mod)
   7. └─optmatch:::fullmatch.default(...)
   8.   ├─optmatch::fullmatch(...)
   9.   └─optmatch:::fullmatch.BlockedInfinitySparseMatrix(...)
  ── Error (test.summary.optmatch.R:70:3): New matching.failed ───────────────────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(pt ~ cost, data = nuclearplants) test.summary.optmatch.R:70:2
   2. └─optmatch:::fullmatch.default(pt ~ cost, data = nuclearplants)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.summary.optmatch.R:145:3): #118 missing subproblem attribute ────
  Error in `fullmatch.matrix(m, min.controls = min.controls, max.controls = max.controls, 
      omit.fraction = omit.fraction, mean.controls = mean.controls, 
      tol = tol, data = mfd, ...)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(pr ~ cost, data = nuclearplants) test.summary.optmatch.R:145:2
   2. └─optmatch:::fullmatch.default(pr ~ cost, data = nuclearplants)
   3.   ├─optmatch::fullmatch(...)
   4.   └─optmatch:::fullmatch.matrix(...)
  ── Error (test.summary.optmatch.old.R:22:3): summary.optmatch ──────────────────
  Error in `fullmatch.InfinitySparseMatrix(psd + caliper(psd, 0.25), data = nuclearplants)`: Some elements of the distance matrix are not found in the data argument.
  Backtrace:
      █
   1. ├─optmatch::fullmatch(psd + caliper(psd, 0.25), data = nuclearplants) test.summary.optmatch.old.R:22:2
   2. └─optmatch:::fullmatch.InfinitySparseMatrix(...)
  
  [ FAIL 86 | WARN 12 | SKIP 2 | PASS 983 ]
  Error: Test failures
  Execution halted