Running 'testthat.R' [117s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(panelr)
  Loading required package: lme4
  Loading required package: Matrix
  
  Attaching package: 'panelr'
  
  The following object is masked from 'package:stats':
  
      filter
  
  > 
  > test_check("panelr")
  [ FAIL 3 | WARN 1 | SKIP 0 | PASS 223 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-utils.R:14'): dplyr functions return panel_data objects ────────
  Error in `is.data.frame(new)`: Can't reconstruct data frame.
  ✖ The `[` method for class <panel_data/grouped_df/tbl_df/tbl/data.frame> must
    return a data frame with 2 columns.
  ℹ It returned a <panel_data/grouped_df/tbl_df/tbl/data.frame> of 3 columns.
  Backtrace:
       ▆
    1. ├─testthat::expect_s3_class(distinct(w, lwage), "tbl_df") at test-utils.R:14:2
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─dplyr::distinct(w, lwage)
    5. ├─panelr:::distinct.panel_data(w, lwage)
    6. │ ├─panelr:::reconstruct(NextMethod(), .data)
    7. │ └─panelr:::reconstruct.panel_data(NextMethod(), .data)
    8. │   └─base::is.data.frame(new)
    9. ├─base::NextMethod()
   10. └─dplyr:::distinct.data.frame(w, lwage)
   11.   └─dplyr:::dplyr_col_select(out, prep$vars)
   12.     └─rlang::abort(bullets, call = error_call)
  ── Error ('test_wbgee.R:160'): (code run outside of `test_that()`) ─────────────
  <vctrs_error_names_must_be_unique/vctrs_error_names/vctrs_error/rlang_error/error/condition>
  Error in `nest.tbl_df(.data, `:=`(!!.key, all_of(cols)), .names_sep = .names_sep)`: Names must be unique.
  ✖ These names are duplicated:
    * "id" at locations 1 and 3.
    * "t" at locations 2 and 4.
  Backtrace:
       ▆
    1. ├─base::suppressWarnings(...) at test_wbgee.R:160:0
    2. │ └─base::withCallingHandlers(...)
    3. └─panelr::wbgee(wks ~ union + lag(lwage) | blk, data = wages, detrend = TRUE)
    4.   └─panelr:::wb_prepare_data(...)
    5.     └─panelr:::detrend(e$data, pf, dt_order, balance_correction, dt_random)
    6.       ├─tidyr::nest(data)
    7.       └─tidyr:::nest.grouped_df(data)
    8.         └─tidyr:::nest.tbl_df(.data, `:=`(!!.key, all_of(cols)), .names_sep = .names_sep)
    9.           └─vctrs::vec_cbind(out, inner, .name_repair = "check_unique", .error_call = error_call)
   10.             └─vctrs (local) `<fn>`()
   11.               └─vctrs:::validate_unique(names = names, arg = arg, call = call)
   12.                 └─vctrs:::stop_names_must_be_unique(names, arg, call = call)
   13.                   └─vctrs:::stop_names(...)
   14.                     └─vctrs:::stop_vctrs(...)
   15.                       └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
  ── Error ('test_wbm.R:236'): (code run outside of `test_that()`) ───────────────
  <vctrs_error_names_must_be_unique/vctrs_error_names/vctrs_error/rlang_error/error/condition>
  Error in `nest.tbl_df(.data, `:=`(!!.key, all_of(cols)), .names_sep = .names_sep)`: Names must be unique.
  ✖ These names are duplicated:
    * "id" at locations 1 and 3.
    * "t" at locations 2 and 4.
  Backtrace:
       ▆
    1. ├─base::suppressWarnings(...) at test_wbm.R:236:0
    2. │ └─base::withCallingHandlers(...)
    3. └─panelr::wbm(...)
    4.   └─panelr:::wb_prepare_data(...)
    5.     └─panelr:::detrend(e$data, pf, dt_order, balance_correction, dt_random)
    6.       ├─tidyr::nest(data)
    7.       └─tidyr:::nest.grouped_df(data)
    8.         └─tidyr:::nest.tbl_df(.data, `:=`(!!.key, all_of(cols)), .names_sep = .names_sep)
    9.           └─vctrs::vec_cbind(out, inner, .name_repair = "check_unique", .error_call = error_call)
   10.             └─vctrs (local) `<fn>`()
   11.               └─vctrs:::validate_unique(names = names, arg = arg, call = call)
   12.                 └─vctrs:::stop_names_must_be_unique(names, arg, call = call)
   13.                   └─vctrs:::stop_names(...)
   14.                     └─vctrs:::stop_vctrs(...)
   15.                       └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
  
  [ FAIL 3 | WARN 1 | SKIP 0 | PASS 223 ]
  Error: Test failures
  Execution halted