Running ‘testthat.R’ [5s/2s]
Running R code in ‘testthat.R’ had CPU time 2.7 times elapsed time
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(constellation)
  > 
  > test_check("constellation")
  ── 1. Error: constellate produces expected values for test patient (@test-conste
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(constellate(crea_testpt, plts_testpt, window_hours = 2, join_key = "PAT_ID", 
         time_var = "RECORDED_TIME", event_name = "TEST", mult = "last"), crea_plts) at testthat/test-constellate.R:51
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: constellate(crea_testpt, plts_testpt, window_hours = 2, join_key = "PAT_ID", time_var = "RECORDED_TIME", 
         event_name = "TEST", mult = "last")
  5: event_df[, .SD[.N], by = join_key]
  6: `[.data.table`(event_df, , .SD[.N], by = join_key)
  
  ── 2. Error: incidents produces expected values for test patient (@test-incident
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(incidents(pulse_testpts, window_hours = 24, time_var = "RECORDED_TIME", 
         join_key = "PAT_ID")[, .SD[1:3], by = PAT_ID], pulse_incidents) at testthat/test-incidents.R:45
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: incidents(pulse_testpts, window_hours = 24, time_var = "RECORDED_TIME", join_key = "PAT_ID")
  5: data[, `:=`(KEEP, get(time_var) >= (get(time_var)[1] + window_hours * 60 * 60)), 
         by = join_key]
  6: `[.data.table`(data, , `:=`(KEEP, get(time_var) >= (get(time_var)[1] + window_hours * 
         60 * 60)), by = join_key)
  
  ── 3. Error: value change produces expected values for test patient (@test-value
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(value_change(sbp_testpt, value = 40, direction = "down", window_hours = 6, 
         join_key = "PAT_ID", time_var = "RECORDED_TIME", value_var = "VALUE", mult = "first"), 
         first_drop) at testthat/test-value_change.R:25
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: value_change(sbp_testpt, value = 40, direction = "down", window_hours = 6, join_key = "PAT_ID", 
         time_var = "RECORDED_TIME", value_var = "VALUE", mult = "first")
  5: data[, (max(get(value_var)) - min(get(value_var))), by = join_key]
  6: `[.data.table`(data, , (max(get(value_var)) - min(get(value_var))), by = join_key)
  
  ── 4. Error: default arguments function properly (@test-value_change.R#54)  ────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(value_change(sbp_testpt, value = 40, direction = "down", window_hours = 6, 
         join_key = "PAT_ID", time_var = "RECORDED_TIME", value_var = "VALUE", mult = "all"), 
         value_change(sbp_testpt, value = 40, direction = "down", window_hours = 6, join_key = "PAT_ID", 
             time_var = "RECORDED_TIME", value_var = "VALUE")) at testthat/test-value_change.R:54
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: value_change(sbp_testpt, value = 40, direction = "down", window_hours = 6, join_key = "PAT_ID", 
         time_var = "RECORDED_TIME", value_var = "VALUE", mult = "all")
  5: data[, (max(get(value_var)) - min(get(value_var))), by = join_key]
  6: `[.data.table`(data, , (max(get(value_var)) - min(get(value_var))), by = join_key)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 100 SKIPPED: 0 FAILED: 4
  1. Error: constellate produces expected values for test patient (@test-constellate.R#51) 
  2. Error: incidents produces expected values for test patient (@test-incidents.R#45) 
  3. Error: value change produces expected values for test patient (@test-value_change.R#25) 
  4. Error: default arguments function properly (@test-value_change.R#54) 
  
  Error: testthat unit tests failed
  Execution halted