Merck / simtrial

Clinical trial simulation for time-to-event endpoints
https://merck.github.io/simtrial/
GNU General Public License v3.0
17 stars 8 forks source link

sim_gs_n: combine hetergenous test columns, fill missing with NAs #277

Closed jdblischak closed 2 months ago

jdblischak commented 2 months ago

Follow up to #273. Now that wlr() returns different columns compared to rmst() and milestone() (and thus the outputs are no longer standardized, #222), @LittleBeannie suggested filling the missing columns with NAs (https://github.com/Merck/simtrial/pull/273#issuecomment-2299109281).

This PR replaces rbind() with data.table::rbindlist() to allow combining test functions that return different functions. I restored the sim_gs_n() tests to confirm this is working.

Note that unfortunately it is still not possible to combine the results of maxcombo() because its z column is a list column. I think I'll be able to get this working, but it will require additional code and tests, so I decided to keep it separate from this PR.

xref: #229, #258