metrumresearchgroup / lastdose

Fast computation of [time since] and [amount of] the most-recent dose in a data set
3 stars 2 forks source link

Undefined behavior when checking ADDL and II #10

Closed kylebaron closed 4 years ago

kylebaron commented 4 years ago

Summary

When either ADDL or II are not found in the data set, lastdose continues to check for missing values, resulting in undefined behavior. The solution is to drop has_addl checks and/or pass in vectors of all zeros for ADDL and II when they are missing.

Tests