If for any reason the earliest_date of the occurrence of a clinical code is missing for a participant during the concept creation part, the program errors out with the following stack trace:
Error:
! Assigned data `value` must be compatible with existing data.
ℹ Error occurred for column `earliest_date`.
x Can't convert <double> to <date>.
The culprit seems to be this line which tries to assign 0 also to the missing date values:
If for any reason the
earliest_date
of the occurrence of a clinical code is missing for a participant during the concept creation part, the program errors out with the following stack trace:The culprit seems to be this line which tries to assign 0 also to the missing date values:
https://github.com/Richard-Packer/DeepPheWAS/blob/d569e975213e4138d026fffe28ea1f42d6aa15ee/R/concept_creation.R#L203C21-L203C21