Running ‘testthat.R’ [3s/3s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(admiralophtha)
  > 
  > test_check("admiralophtha")
  Saving _problems/test-derive_var_studyeye-29.R
  Saving _problems/test-derive_var_studyeye-66.R
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 8 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-derive_var_studyeye.R:26:3'): derive_var_studyeye Test 1: STUDYEYE is derived correctly in normal case ──
  Error in `left_join(dataset, add_data, by = vars2chr(by_vars), relationship = relationship)`: could not find function "left_join"
  Backtrace:
      ▆
   1. ├─expected_output1 %>% select(-STUDYEYE) %>% ... at test-derive_var_studyeye.R:26:3
   2. ├─admiralophtha::derive_var_studyeye(., sc1)
   3. │ ├─... %>% mutate(STUDYEYE = seye_cat(STUDYEYE))
   4. │ └─admiral::derive_vars_merged(...)
   5. │   └─base::tryCatch(...)
   6. │     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   7. │       └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8. │         └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   9. └─dplyr::mutate(., STUDYEYE = seye_cat(STUDYEYE))
  ── Error ('test-derive_var_studyeye.R:63:3'): derive_var_studyeye Test 2: STUDYEYE is derived correctly when parsing non-standard SCTESTCD ──
  Error in `left_join(dataset, add_data, by = vars2chr(by_vars), relationship = relationship)`: could not find function "left_join"
  Backtrace:
      ▆
   1. ├─expected_output2 %>% select(-STUDYEYE) %>% ... at test-derive_var_studyeye.R:63:3
   2. ├─admiralophtha::derive_var_studyeye(., sc2, "STDEYE")
   3. │ ├─... %>% mutate(STUDYEYE = seye_cat(STUDYEYE))
   4. │ └─admiral::derive_vars_merged(...)
   5. │   └─base::tryCatch(...)
   6. │     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   7. │       └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   8. │         └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   9. └─dplyr::mutate(., STUDYEYE = seye_cat(STUDYEYE))
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 8 ]
  Error:
  ! Test failures.
  Execution halted