CRAN Package Check Results for Package confoundr

Last updated on 2023-02-03 22:57:18 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.2 11.28 200.03 211.31 ERROR
r-devel-linux-x86_64-debian-gcc 1.2 10.52 144.19 154.71 ERROR
r-devel-linux-x86_64-fedora-clang 1.2 270.93 ERROR
r-devel-linux-x86_64-fedora-gcc 1.2 280.02 ERROR
r-devel-windows-x86_64 1.2 40.00 220.00 260.00 ERROR
r-patched-linux-x86_64 1.2 11.81 192.00 203.81 ERROR
r-release-linux-x86_64 1.2 11.74 188.71 200.45 ERROR
r-release-macos-arm64 1.2 110.00 OK
r-release-macos-x86_64 1.2 309.00 OK
r-release-windows-x86_64 1.2 33.00 395.00 428.00 OK
r-oldrel-macos-arm64 1.2 158.00 OK
r-oldrel-macos-x86_64 1.2 229.00 OK
r-oldrel-windows-ix86+x86_64 1.2 25.00 224.00 249.00 ERROR

Check Details

Version: 1.2
Check: examples
Result: ERROR
    Running examples in ‘confoundr-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: makehistory.one
    > ### Title: Function to create exposure history for a single time varying
    > ### exposure.
    > ### Aliases: makehistory.one
    >
    > ### ** Examples
    >
    > # Simulate wide data set for two subjects
    > id <- as.numeric(c(1, 2))
    > a_0 <- as.numeric(c(0, 1))
    > a_1 <- as.numeric(c(1, 1))
    > a_2 <- as.numeric(c(1, 0))
    > l_0 <- as.numeric(rbinom(2, 1, 0.5))
    > l_1 <- as.numeric(rbinom(2, 1, 0.5))
    > l_2 <- as.numeric(rbinom(2, 1, 0.5))
    > m_0 <- as.numeric(rbinom(2, 1, 0.5))
    > m_1 <- as.numeric(rbinom(2, 1, 0.5))
    > m_2 <- as.numeric(rbinom(2, 1, 0.5))
    > n_0 <- as.numeric(rbinom(2, 1, 0.5))
    > n_1 <- as.numeric(rbinom(2, 1, 0.5))
    > n_2 <- as.numeric(rbinom(2, 1, 0.5))
    >
    > mydata.wide <- data.frame(id, a_0, a_1, a_2,
    + l_0, l_1, l_2,
    + m_0, m_1, m_2,
    + n_0, n_1, n_2)
    >
    > # Run the makehistory.one() function
    > mydata.history <- makehistory.one(input=mydata.wide,
    + id="id",
    + times=c(0,1,2),
    + exposure="a",
    + name.history="h"
    + )
    Error in `mutate()`:
    ℹ In argument: `his.lag = if_else(...)`.
    ℹ In group 1: `ID = 1`.
    Caused by error in `nth()`:
    ! Can't convert `default` <character> to match type of `x` <double>.
    Backtrace:
     ▆
     1. ├─confoundr::makehistory.one(...)
     2. │ └─... %>% spread(.data$his.name.time, .data$his.value)
     3. ├─tidyr::spread(., .data$his.name.time, .data$his.value)
     4. ├─tidyr::unite(...)
     5. ├─dplyr::select(., .data$ID, c("his.name", "his.time", "his.value"))
     6. ├─dplyr::mutate(...)
     7. ├─dplyr:::mutate.data.frame(...)
     8. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
     9. │ ├─base::withCallingHandlers(...)
     10. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
     11. │ └─mask$eval_all_mutate(quo)
     12. │ └─dplyr (local) eval()
     13. ├─dplyr::if_else(...)
     14. │ └─vctrs::vec_assert(x = condition, ptype = logical(), arg = "condition")
     15. │ └─vctrs:::vec_is_vector(x)
     16. ├─dplyr::first(.data$his.time, default = "NA")
     17. │ └─dplyr::nth(x, 1L, order_by = order_by, default = default, na_rm = na_rm)
     18. │ └─dplyr:::check_nth_default(default, x = x)
     19. │ └─vctrs::vec_cast(...)
     20. └─vctrs (local) `<fn>`()
     21. └─vctrs::vec_default_cast(...)
     22. ├─base::withRestarts(...)
     23. │ └─base (local) withOneRestart(expr, restarts[[1L]])
     24. │ └─base (local) doWithOneRestart(return(expr), restart)
     25. └─vctrs::stop_incompatible_cast(...)
     26. └─vctrs::stop_incompatible_type(...)
     27. └─vctrs:::stop_incompatible(...)
     28. └─vctrs:::stop_vctrs(...)
     29. └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 1.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [77s/83s]
    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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.2
Check: re-building of vignette outputs
Result: ERROR
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘quickdemo.Rmd’ using rmarkdown
    Quitting from lines 38-46 (quickdemo.Rmd)
    Error: processing vignette ‘quickdemo.Rmd’ failed with diagnostics:
    ℹ In argument: `his.lag = if_else(...)`.
    ℹ In group 1: `ID = 1`.
    Caused by error in `nth()`:
    ! Can't convert `default` <character> to match type of `x` <double>.
    --- failed re-building ‘quickdemo.Rmd’
    
    --- re-building ‘selectionbias.Rmd’ using rmarkdown
    Quitting from lines 154-164 (selectionbias.Rmd)
    Error: processing vignette ‘selectionbias.Rmd’ failed with diagnostics:
    ℹ In argument: `his.lag = if_else(...)`.
    ℹ In group 1: `ID = 1001`.
    Caused by error in `nth()`:
    ! Can't convert `default` <character> to match type of `x` <double>.
    --- failed re-building ‘selectionbias.Rmd’
    
    SUMMARY: processing the following files failed:
     ‘quickdemo.Rmd’ ‘selectionbias.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 1.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [55s/88s]
    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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.2
Check: examples
Result: ERROR
    Running examples in ‘confoundr-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: makehistory.one
    > ### Title: Function to create exposure history for a single time varying
    > ### exposure.
    > ### Aliases: makehistory.one
    >
    > ### ** Examples
    >
    > # Simulate wide data set for two subjects
    > id <- as.numeric(c(1, 2))
    > a_0 <- as.numeric(c(0, 1))
    > a_1 <- as.numeric(c(1, 1))
    > a_2 <- as.numeric(c(1, 0))
    > l_0 <- as.numeric(rbinom(2, 1, 0.5))
    > l_1 <- as.numeric(rbinom(2, 1, 0.5))
    > l_2 <- as.numeric(rbinom(2, 1, 0.5))
    > m_0 <- as.numeric(rbinom(2, 1, 0.5))
    > m_1 <- as.numeric(rbinom(2, 1, 0.5))
    > m_2 <- as.numeric(rbinom(2, 1, 0.5))
    > n_0 <- as.numeric(rbinom(2, 1, 0.5))
    > n_1 <- as.numeric(rbinom(2, 1, 0.5))
    > n_2 <- as.numeric(rbinom(2, 1, 0.5))
    >
    > mydata.wide <- data.frame(id, a_0, a_1, a_2,
    + l_0, l_1, l_2,
    + m_0, m_1, m_2,
    + n_0, n_1, n_2)
    >
    > # Run the makehistory.one() function
    > mydata.history <- makehistory.one(input=mydata.wide,
    + id="id",
    + times=c(0,1,2),
    + exposure="a",
    + name.history="h"
    + )
    Error in `mutate()`:
    ℹ In argument: `his.lag = if_else(...)`.
    ℹ In group 1: `ID = 1`.
    Caused by error in `nth()`:
    ! Can't convert `default` <character> to match type of `x` <double>.
    Backtrace:
     ▆
     1. ├─confoundr::makehistory.one(...)
     2. │ └─... %>% spread(.data$his.name.time, .data$his.value)
     3. ├─tidyr::spread(., .data$his.name.time, .data$his.value)
     4. ├─tidyr::unite(...)
     5. ├─dplyr::select(., .data$ID, c("his.name", "his.time", "his.value"))
     6. ├─dplyr::mutate(...)
     7. ├─dplyr:::mutate.data.frame(...)
     8. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
     9. │ ├─base::withCallingHandlers(...)
     10. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
     11. │ └─mask$eval_all_mutate(quo)
     12. │ └─dplyr (local) eval()
     13. ├─dplyr::if_else(...)
     14. │ └─vctrs::vec_assert(x = condition, ptype = logical(), arg = "condition")
     15. │ └─vctrs:::vec_is_vector(x)
     16. ├─dplyr::first(.data$his.time, default = "NA")
     17. │ └─dplyr::nth(x, 1L, order_by = order_by, default = default, na_rm = na_rm)
     18. │ └─dplyr:::check_nth_default(default, x = x)
     19. │ └─vctrs::vec_cast(...)
     20. └─vctrs (local) `<fn>`()
     21. └─vctrs::vec_default_cast(...)
     22. ├─base::withRestarts(...)
     23. │ └─base (local) withOneRestart(expr, restarts[[1L]])
     24. │ └─base (local) doWithOneRestart(return(expr), restart)
     25. └─vctrs::stop_incompatible_cast(...)
     26. └─vctrs::stop_incompatible_type(...)
     27. └─vctrs:::stop_incompatible(...)
     28. └─vctrs:::stop_vctrs(...)
     29. └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
    Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64

Version: 1.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [96s/400s]
    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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.2
Check: re-building of vignette outputs
Result: ERROR
    Error(s) in re-building vignettes:
    --- re-building ‘quickdemo.Rmd’ using rmarkdown
    Quitting from lines 38-46 (quickdemo.Rmd)
    Error: processing vignette 'quickdemo.Rmd' failed with diagnostics:
    ℹ In argument: `his.lag = if_else(...)`.
    ℹ In group 1: `ID = 1`.
    Caused by error in `nth()`:
    ! Can't convert `default` <character> to match type of `x` <double>.
    --- failed re-building ‘quickdemo.Rmd’
    
    --- re-building ‘selectionbias.Rmd’ using rmarkdown
    Quitting from lines 154-164 (selectionbias.Rmd)
    Error: processing vignette 'selectionbias.Rmd' failed with diagnostics:
    ℹ In argument: `his.lag = if_else(...)`.
    ℹ In group 1: `ID = 1001`.
    Caused by error in `nth()`:
    ! Can't convert `default` <character> to match type of `x` <double>.
    --- failed re-building ‘selectionbias.Rmd’
    
    SUMMARY: processing the following files failed:
     ‘quickdemo.Rmd’ ‘selectionbias.Rmd’
    
    Error: Vignette re-building failed.
    Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64

Version: 1.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [97s/375s]
    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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 1.2
Check: tests
Result: ERROR
     Running 'testthat.R' [70s]
    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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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
Flavor: r-devel-windows-x86_64

Version: 1.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [75s/89s]
    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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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
Flavor: r-patched-linux-x86_64

Version: 1.2
Check: tests
Result: ERROR
     Running ‘testthat.R’ [74s/86s]
    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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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 = ""))`: ℹ In argument: `his.lag = if_else(...)`.
     ℹ 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
Flavor: r-release-linux-x86_64

Version: 1.2
Check: examples
Result: ERROR
    Running examples in 'confoundr-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: makehistory.one
    > ### Title: Function to create exposure history for a single time varying
    > ### exposure.
    > ### Aliases: makehistory.one
    >
    > ### ** Examples
    >
    > # Simulate wide data set for two subjects
    > id <- as.numeric(c(1, 2))
    > a_0 <- as.numeric(c(0, 1))
    > a_1 <- as.numeric(c(1, 1))
    > a_2 <- as.numeric(c(1, 0))
    > l_0 <- as.numeric(rbinom(2, 1, 0.5))
    > l_1 <- as.numeric(rbinom(2, 1, 0.5))
    > l_2 <- as.numeric(rbinom(2, 1, 0.5))
    > m_0 <- as.numeric(rbinom(2, 1, 0.5))
    > m_1 <- as.numeric(rbinom(2, 1, 0.5))
    > m_2 <- as.numeric(rbinom(2, 1, 0.5))
    > n_0 <- as.numeric(rbinom(2, 1, 0.5))
    > n_1 <- as.numeric(rbinom(2, 1, 0.5))
    > n_2 <- as.numeric(rbinom(2, 1, 0.5))
    >
    > mydata.wide <- data.frame(id, a_0, a_1, a_2,
    + l_0, l_1, l_2,
    + m_0, m_1, m_2,
    + n_0, n_1, n_2)
    >
    > # Run the makehistory.one() function
    > mydata.history <- makehistory.one(input=mydata.wide,
    + id="id",
    + times=c(0,1,2),
    + exposure="a",
    + name.history="h"
    + )
    Error in `mutate()`:
    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>.
    Backtrace:
     x
     1. +-confoundr::makehistory.one(...)
     2. | \-... %>% spread(.data$his.name.time, .data$his.value)
     3. +-tidyr::spread(., .data$his.name.time, .data$his.value)
     4. +-tidyr::unite(...)
     5. +-dplyr::select(., .data$ID, c("his.name", "his.time", "his.value"))
     6. +-dplyr::mutate(...)
     7. +-dplyr:::mutate.data.frame(...)
     8. | \-dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
     9. | +-base::withCallingHandlers(...)
     10. | \-dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
     11. | \-mask$eval_all_mutate(quo)
     12. | \-dplyr (local) eval()
     13. +-dplyr::if_else(...)
     14. | \-vctrs::vec_assert(x = condition, ptype = logical(), arg = "condition")
     15. | \-vctrs:::vec_is_vector(x)
     16. +-dplyr::first(.data$his.time, default = "NA")
     17. | \-dplyr::nth(x, 1L, order_by = order_by, default = default, na_rm = na_rm)
     18. | \-dplyr:::check_nth_default(default, x = x)
     19. | \-vctrs::vec_cast(...)
     20. \-vctrs (local) `<fn>`()
     21. \-vctrs::vec_default_cast(...)
     22. +-base::withRestarts(...)
     23. | \-base (local) withOneRestart(expr, restarts[[1L]])
     24. | \-base (local) doWithOneRestart(return(expr), restart)
     25. \-vctrs::stop_incompatible_cast(...)
     26. \-vctrs::stop_incompatible_type(...)
     27. \-vctrs:::stop_incompatible(...)
     28. \-vctrs:::stop_vctrs(...)
     29. \-rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call))
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 1.2
Check: tests
Result: ERROR
     Running 'testthat.R' [80s]
    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
Flavor: r-oldrel-windows-ix86+x86_64

Version: 1.2
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building 'quickdemo.Rmd' using rmarkdown
    Quitting from lines 38-46 (quickdemo.Rmd)
    Error: processing vignette 'quickdemo.Rmd' failed with diagnostics:
    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>.
    --- failed re-building 'quickdemo.Rmd'
    
    --- re-building 'selectionbias.Rmd' using rmarkdown
    Quitting from lines 154-164 (selectionbias.Rmd)
    Error: processing vignette 'selectionbias.Rmd' failed with diagnostics:
    i In argument: `his.lag = if_else(...)`.
    i In group 1: `ID = 1001`.
    Caused by error in `nth()`:
    ! Can't convert `default` <character> to match type of `x` <double>.
    --- failed re-building 'selectionbias.Rmd'
    
    SUMMARY: processing the following files failed:
     'quickdemo.Rmd' 'selectionbias.Rmd'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64