Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > test_check("namedCapture")
  Loading required package: namedCapture
  ── 1. Failure: PCRE error for factor column (@test-CRAN-df.R#353)  ─────────────
  `{ ... }` threw an error with unexpected message.
  Expected match: "subject.vec should be a character vector with length>0"
  Actual message: "pattern must contain named capture groups (?P<name>subpattern)"
  Backtrace:
    1. testthat::expect_error(...)
    6. namedCapture::df_match_variable(data.frame(foo = "bar"), foo = "bar")
    9. namedCapture::str_match_named(L$subject.vec, L$pattern, L$fun.list)
   10. namedCapture:::names_or_error(vec.with.attrs)
   11. namedCapture:::stop_for_names()
  
  ── 2. Failure: RE2 error for factor column (@test-CRAN-df.R#353)  ──────────────
  `{ ... }` threw an error with unexpected message.
  Expected match: "subject.vec should be a character vector with length>0"
  Actual message: "pattern must contain named capture groups (?P<name>subpattern)"
  Backtrace:
    1. testthat::expect_error(...)
    6. namedCapture::df_match_variable(data.frame(foo = "bar"), foo = "bar")
    9. namedCapture::str_match_named(L$subject.vec, L$pattern, L$fun.list)
   10. namedCapture:::only_captures(re2.mat)
   11. namedCapture:::stop_for_names()
  
   chr NA
   Factor w/ 1 level "(?P<regex>foo)": 1
   chr [1:2] "(?P<name>.)" "(?P<name>.)"
   chr(0) 
    chrom name
  2  chr2  300
  3  chr2  300
    chrom name
  2  chr2  300
  3  chr2  300
    name chromStart
  2 chr2        300
  3 chr2        300
    name chromStart
  2 <NA>       <NA>
    name chromStart
  2 <NA>       <NA>
  3 <NA>       <NA>
    name chromStart
  2 <NA>       <NA>
         name       value
  1 assayType Myeloidcell
  3 assayType     H3K4me3
   chr NA
   Factor w/ 1 level "(?P<regex>foo)": 1
   chr [1:2] "(?P<name>.)" "(?P<name>.)"
   chr(0) 
    chrom name
  2  chr2  300
  3  chr2  300
    chrom name
  2  chr2  300
  3  chr2  300
    name chromStart
  2 chr2        300
  3 chr2        300
    name chromStart
  2 <NA>       <NA>
    name chromStart
  2 <NA>       <NA>
  3 <NA>       <NA>
    name chromStart
  2 <NA>       <NA>
         name       value
  1 assayType Myeloidcell
  3 assayType     H3K4me3
  [1] "bar" "baz"
  [1] "bar" "baz"
  character(0)
  character(0)
  [1] 1
  [1] 1
  [1] "bar" "baz"
  [1] "bar" "baz"
  character(0)
  character(0)
  [1] 1
  [1] 1
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 273 | SKIPPED: 0 | WARNINGS: 1 | FAILED: 2 ]
  1. Failure: PCRE error for factor column (@test-CRAN-df.R#353) 
  2. Failure: RE2 error for factor column (@test-CRAN-df.R#353) 
  
  Error: testthat unit tests failed
  Execution halted