adibender / pammtools

Piece-wise exponential Additive Mixed Modeling tools
https://adibender.github.io/pammtools/
Other
47 stars 11 forks source link

problem when using with dplyr 1.0.8 #202

Closed romainfrancois closed 2 years ago

romainfrancois commented 2 years ago

We're about to release dplyr 1.0.8 and as part of running our rev dep tests, we've identified that this package may have a problem:

> checking tests ... ERROR
  See below...

── Test failures ─────────────────────────────────────────────────────────────────────────────── testthat ────

> Sys.setenv("R_TESTS" = "") # see https://github.com/hadley/testthat/issues/86
> library(testthat)
> library(checkmate)
> library(dplyr)

Attaching package: 'dplyr'

The following object is masked from 'package:testthat':

    matches

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

> library(purrr)

Attaching package: 'purrr'

The following object is masked from 'package:testthat':

    is_null

> library(tidyr)

Attaching package: 'tidyr'

The following object is masked from 'package:testthat':

    matches

> # library(pammtools)
> 
> test_check("pammtools")
Loading required package: pammtools

Attaching package: 'pammtools'

The following object is masked from 'package:stats':

    filter

══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-add-functions.R:268:3): CIF works ───────────────────────────────
Error in `apply(Reduce("+", hazards), 2, function(z) exp(-cumsum(z * newdata[["intlen"]])))`: dim(X) must have a positive length
Backtrace:
    ▆
 1. ├─... %>% add_cif(pam) at test-add-functions.R:268:2
 2. ├─pammtools::add_cif(., pam)
 3. └─pammtools:::add_cif.default(., pam)
 4.   └─purrr::map_dfr(...)
 5.     └─purrr::map(.x, .f, ...)
 6.       └─pammtools .f(.x[[i]], ...)
 7.         ├─pammtools:::get_cif(...)
 8.         └─pammtools:::get_cif.default(...)
 9.           └─base::apply(...)

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 359 ]
Error: Test failures
Execution halted

1 error x | 0 warnings ✓ | 0 notes ✓

I have not been able to figure out what the problem is, or identify if this is dplyr related or caused by something else.