data(hfactioncpx12)
hf <- hfactioncpx12
dtable(hf, ~status)
## Separate counts for event types 1 and 2
rr <- count_history(hf, types = 1:2, id = "id", status = "status")
dtable(rr, ~"Count*" + status, level = 1)
Run the code above in your browser using DataLab