Running 'testthat.R' [84s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(confoundr)
  > 
  > test_check("confoundr")
  [ FAIL 4 | WARN 58 | SKIP 0 | PASS 342 ]
  
  == Failed tests ================================================================
  -- Error ('testMakeHistoryOne.r:12'): Formats and Names under No Dropout -------
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., his.name = name.history, his.time = .data$exp.time, 
      his.lag = if_else(.data$exp.time == first(.data$his.time, 
          default = "NA"), "H", lag(.data$exp.value)), his.value = CumPaste(.data$his.lag))`: i In argument: `his.lag = if_else(...)`.
  i In group 1: `ID = 1`.
  Caused by error in `nth()`:
  ! Can't convert `default` <character> to match type of `x` <double>.
  -- Error ('testMakeHistoryOne.r:50'): Formats and Names under Dropout ----------
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., his.name = name.history, his.time = .data$exp.time, 
      his.lag = if_else(.data$exp.time == first(.data$his.time, 
          default = "NA"), "H", lag(.data$exp.value)), his.value = CumPaste(.data$his.lag))`: i In argument: `his.lag = if_else(...)`.
  i In group 1: `ID = 1`.
  Caused by error in `nth()`:
  ! Can't convert `default` <character> to match type of `x` <double>.
  -- Error ('testMakeHistoryTwo.r:12'): Formats and Names under No Dropout -------
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., his.name.a = name.history.a, his.name.b = name.history.b, 
      his.time.a = .data$exp.time, his.time.b = .data$exp.time, 
      his.lag = if_else(.data$exp.time == first(.data$exp.time, 
          default = "NA"), "H", lag(paste(.data$exp.value.a, .data$exp.value.b, 
          sep = ""))), his.value.a = CumPaste(.data$his.lag), his.value.b = paste(CumPaste(.data$his.lag), 
          .data$exp.value.a, sep = ""))`: i In argument: `his.lag = if_else(...)`.
  i In group 1: `ID = 1`.
  Caused by error in `nth()`:
  ! Can't convert `default` <character> to match type of `x` <double>.
  -- Error ('testMakeHistoryTwo.r:71'): Formats and Names under Dropout ----------
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `mutate(., his.name.a = name.history.a, his.name.b = name.history.b, 
      his.time.a = .data$exp.time, his.time.b = .data$exp.time, 
      his.lag = if_else(.data$exp.time == first(.data$exp.time, 
          default = "NA"), "H", lag(paste(.data$exp.value.a, .data$exp.value.b, 
          sep = ""))), his.value.a = CumPaste(.data$his.lag), his.value.b = paste(CumPaste(.data$his.lag), 
          .data$exp.value.a, sep = ""))`: i In argument: `his.lag = if_else(...)`.
  i In group 1: `ID = 1`.
  Caused by error in `nth()`:
  ! Can't convert `default` <character> to match type of `x` <double>.
  
  [ FAIL 4 | WARN 58 | SKIP 0 | PASS 342 ]
  Error: Test failures
  Execution halted