Running ‘testthat.R’ [3m/11m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library("testthat")
  > library("cat2cat")
  > 
  > test_check("cat2cat")
  
  Attaching package: 'dplyr'
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  Saving _problems/test-cat2cat-160.R
  Saving _problems/test-cat2cat_internal_utils-6.R
  Saving _problems/test-cat2cat_internal_utils-42.R
  Loading required package: ggplot2
  Loading required package: lattice
  randomForest 4.7-1.2
  Type rfNews() to see new features/changes/bug fixes.
  
  Attaching package: 'randomForest'
  
  The following object is masked from 'package:ggplot2':
  
      margin
  
  The following object is masked from 'package:dplyr':
  
      combine
  
  Adding missing grouping variables: `index_c2c`
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 105 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-cat2cat.R:141:1'): (code run outside of `test_that()`) ─────────
  Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values
  Backtrace:
       ▆
    1. └─cat2cat::cat2cat(...) at test-cat2cat.R:141:1
    2.   └─cat2cat:::resolve_frequencies(...)
    3.     └─cat2cat::get_freqs(cats_base, if (!is.null(multiplier_var)) cat_base_year[[multiplier_var]])
    4.       ├─base::as.data.frame(table(input, useNA = "ifany"), stringsAsFactors = FALSE)
    5.       └─base::as.data.frame.table(table(input, useNA = "ifany"), stringsAsFactors = FALSE)
    6.         ├─base::eval(ex)
    7.         │ └─base::eval(ex)
    8.         └─base::data.frame(...)
    9.           ├─base::as.data.frame(x[[i]], optional = TRUE)
   10.           └─base::as.data.frame.integer(x[[i]], optional = TRUE)
  ── Error ('test-cat2cat_internal_utils.R:3:3'): get_freqs ──────────────────────
  Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values
  Backtrace:
       ▆
    1. ├─testthat::expect_identical(...) at test-cat2cat_internal_utils.R:3:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─cat2cat::get_freqs(input)
    5.   ├─base::as.data.frame(table(input, useNA = "ifany"), stringsAsFactors = FALSE)
    6.   └─base::as.data.frame.table(table(input, useNA = "ifany"), stringsAsFactors = FALSE)
    7.     ├─base::eval(ex)
    8.     │ └─base::eval(ex)
    9.     └─base::data.frame(...)
   10.       ├─base::as.data.frame(x[[i]], optional = TRUE)
   11.       └─base::as.data.frame.integer(x[[i]], optional = TRUE)
  ── Error ('test-cat2cat_internal_utils.R:39:3'): cat_apply_freq ────────────────
  Error in `as.data.frame.integer(x[[i]], optional = TRUE)`: row names contain missing values
  Backtrace:
       ▆
    1. ├─cat2cat::cat_apply_freq(...) at test-cat2cat_internal_utils.R:39:3
    2. │ ├─base::stopifnot(ncol(freqs) == 2)
    3. │ └─base::ncol(freqs)
    4. └─cat2cat::get_freqs(c(1, 1, 1, 1, 2, 3, 3, NA, NA))
    5.   ├─base::as.data.frame(table(input, useNA = "ifany"), stringsAsFactors = FALSE)
    6.   └─base::as.data.frame.table(table(input, useNA = "ifany"), stringsAsFactors = FALSE)
    7.     ├─base::eval(ex)
    8.     │ └─base::eval(ex)
    9.     └─base::data.frame(...)
   10.       ├─base::as.data.frame(x[[i]], optional = TRUE)
   11.       └─base::as.data.frame.integer(x[[i]], optional = TRUE)
  
  [ FAIL 3 | WARN 0 | SKIP 0 | PASS 105 ]
  Error:
  ! Test failures.
  Execution halted