What happened?
Lines 120–130 convert the target date using as.Date, which turns partial dates into NA—this is expected, as complete dates are required for calculation. However, the code then converts numeric dates back to character format and overwrites the original variable, resulting in a column that retains only complete dates.
Session Information
No response
Reproducible Example
No response
What happened?
Lines 120–130 convert the target date using as.Date, which turns partial dates into NA—this is expected, as complete dates are required for calculation. However, the code then converts numeric dates back to character format and overwrites the original variable, resulting in a column that retains only complete dates.
Session Information
No response
Reproducible Example
No response