Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(msmtools)
  > 
  > test_check("msmtools")
  OMP: Warning #96: Cannot form a team with 11 threads, using 2 instead.
  OMP: Hint Consider unsetting KMP_DEVICE_THREAD_LIMIT (KMP_ALL_THREADS), KMP_TEAMS_THREAD_LIMIT, and OMP_THREAD_LIMIT (if any are set).
  ── 1. Error: a warning is printed when t_cens is the only var used  ────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_warning(augment(hosp, subj, adm_number, label_3, t_start = dateIN, t_end = dateOUT, 
         t_cens = dateCENS, verbose = F))
  2: quasi_capture(enquo(object), capture_warnings, label = label)
  3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
  4: withCallingHandlers(code, warning = function(condition) {
         out$push(condition)
         invokeRestart("muffleWarning")
     })
  5: eval_bare(get_expr(quo), get_env(quo))
  6: augment(hosp, subj, adm_number, label_3, t_start = dateIN, t_end = dateOUT, t_cens = dateCENS, 
         verbose = F)
  7: data[, .(ev = all(get(cols[[2]]) == cummax(get(cols[[2]])))), by = eval(cols[[1]])]
  8: `[.data.table`(data, , .(ev = all(get(cols[[2]]) == cummax(get(cols[[2]])))), by = eval(cols[[1]]))
  
  ── 2. Error: (unknown) (@test_dataset_return.R#18)  ────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: augment(data = hosp, data_key = subj, n_events = adm_number, pattern = label_2, t_start = dateIN, 
         t_end = dateOUT, t_cens = dateCENS, verbose = F) at testthat/test_dataset_return.R:18
  2: data[, .(ev = all(get(cols[[2]]) == cummax(get(cols[[2]])))), by = eval(cols[[1]])]
  3: `[.data.table`(data, , .(ev = all(get(cols[[2]]) == cummax(get(cols[[2]])))), by = eval(cols[[1]]))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 2 SKIPPED: 0 FAILED: 2
  1. Error: a warning is printed when t_cens is the only var used 
  2. Error: (unknown) (@test_dataset_return.R#18) 
  
  Error: testthat unit tests failed
  Execution halted