insightsengineering / tern

Table, Listings, and Graphs (TLG) library for common outputs used in clinical trials
https://insightsengineering.github.io/tern/
Other
77 stars 22 forks source link

[Bug Report] `g_km` fails with multiple max time records #1279

Closed edelarua closed 3 months ago

edelarua commented 3 months ago

When multiple records have estimates at max time, g_km fails with error:

Error in yval == “Survival” && data$estimate[data$time == max_time2] > : length = 2’ in coercion to ‘logical(1)’
shajoezhu commented 3 months ago

hi @khatril , is this right though? can we have multiple records at t_max?

@edelarua , when this bug was flagged, was it from a single patient? or multiple?

Thanks

edelarua commented 3 months ago

Hi @shajoezhu,

I’m not 100% sure this is the issue but based on the error message returned and the context from the post I think it’s likely this. If this outcome isn’t allowed I can add an error message instead. The post is on Roche Overflow if you’d like to read it over.