# \donttest{
BL <- list(fot = 0:5, per = c("2003-01-01","2008-01-01", "2013-01-01"))
## Aggregated data
x1 <- lexpand(sire, breaks = BL, status = status != 0,
birth = bi_date, entry = dg_date, exit = ex_date,
pophaz=popmort,
aggre=list(sex, period = per, surv.int = fot))
sir_ag(x1, print = 'period')
# no aggreate or breaks
x2 <- lexpand(sire, status = status != 0,
birth = bi_date, entry = dg_date, exit = ex_date,
pophaz=popmort)
sir_lex(x2, breaks = BL, print = 'per')
# }
Run the code above in your browser using DataLab