Running ‘testthat.R’ [5s/7s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(dplyr)
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  > library(ipfr)
  > 
  > test_check("ipfr")
  ── 1. Error: basic ipu works (@test-basics.R#22)  ──────────────────────────────
  `i` must have one dimension, not 2.
  Backtrace:
    1. ipfr::ipu(hh_seed, hh_targets, per_seed, per_targets, max_iterations = 30)
    2. ipfr:::check_tables(...)
    3. ipfr:::check_missing_categories(primary_seed, tbl, name, geo_colname)
    9. tibble:::`[.tbl_df`(target, target[geo_colname] == geo, )
   10. tibble:::tbl_subset_row(xo, i = i, i_arg)
   11. tibble:::vectbl_as_row_index(i, x, i_arg)
   12. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   19. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 2. Error: single marginal targets work (@test-basics.R#58)  ─────────────────
  `i` must have one dimension, not 2.
  Backtrace:
    1. ipfr::ipu(hh_seed, hh_targets, per_seed, per_targets, max_iterations = 1)
    2. ipfr:::check_tables(...)
    3. ipfr:::check_missing_categories(primary_seed, tbl, name, geo_colname)
    9. tibble:::`[.tbl_df`(target, target[geo_colname] == geo, )
   10. tibble:::tbl_subset_row(xo, i = i, i_arg)
   11. tibble:::vectbl_as_row_index(i, x, i_arg)
   12. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   19. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 3. Error: weight constraint works (@test-basics.R#71)  ──────────────────────
  `i` must have one dimension, not 2.
  Backtrace:
    1. ipfr::ipu(...)
    2. ipfr:::check_tables(...)
    3. ipfr:::check_missing_categories(primary_seed, tbl, name, geo_colname)
    9. tibble:::`[.tbl_df`(target, target[geo_colname] == geo, )
   10. tibble:::tbl_subset_row(xo, i = i, i_arg)
   11. tibble:::vectbl_as_row_index(i, x, i_arg)
   12. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   19. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 4. Error: multiple geographies work (@test-basics.R#84)  ────────────────────
  `i` must have one dimension, not 2.
  Backtrace:
    1. ipfr::ipu(...)
    2. ipfr:::check_tables(...)
    3. ipfr:::check_missing_categories(primary_seed, tbl, name, geo_colname)
    9. tibble:::`[.tbl_df`(target, target[geo_colname] == geo, )
   10. tibble:::tbl_subset_row(xo, i = i, i_arg)
   11. tibble:::vectbl_as_row_index(i, x, i_arg)
   12. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   19. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 5. Error: single value marginals work (@test-basics.R#140)  ─────────────────
  `i` must have one dimension, not 2.
  Backtrace:
    1. ipfr::ipu(hh_seed, hh_targets)
    2. ipfr:::check_tables(primary_seed, primary_targets, primary_id = primary_id)
    3. ipfr:::check_missing_categories(primary_seed, tbl, name, geo_colname)
    9. tibble:::`[.tbl_df`(target, target[geo_colname] == geo, )
   10. tibble:::tbl_subset_row(xo, i = i, i_arg)
   11. tibble:::vectbl_as_row_index(i, x, i_arg)
   12. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   19. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 3 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 5 ]
  1. Error: basic ipu works (@test-basics.R#22) 
  2. Error: single marginal targets work (@test-basics.R#58) 
  3. Error: weight constraint works (@test-basics.R#71) 
  4. Error: multiple geographies work (@test-basics.R#84) 
  5. Error: single value marginals work (@test-basics.R#140) 
  
  Error: testthat unit tests failed
  Execution halted