Create a recurrent event survival object, used as a response variable in reReg. This function is replacing the original reSurv() in version 1.1.6. See ?reda::Recur for more details.

See also

Examples

Recur(2:6, id = c(1, 1, 1, 2, 2))
#> [1] 1: (0, 2], (2, 3], (3, 4+] 2: (0, 5], (5, 6+]
Recur(2:6, id = c(1, 1, 1, 2, 2))
#> [1] 1: (0, 2], (2, 3], (3, 4+] 2: (0, 5], (5, 6+]
Recur(1:5 %2% 2:6, id = c(1, 1, 1, 2, 2))
#> [1] 1: (1, 2], (2, 3], (3, 4+] 2: (4, 5], (5, 6+]