I'm new with R programming and struggling to fix and error with my predecessors script. Below is the section that is thowing the following error:
"Error in findInterval(hash1, hash2) :
'vec' must be sorted non-decreasingly and not contain NAs"
MeditechRvus$ActualIndex <- survival::neardate(as.character(MeditechRvus$CPT),
I don't see anything stating findinterval anywhere in the 8 scripts comprising this package. However, I have read that survival::neardate is similar. Does anyone know how to interpret this error message and how I should reword this chunk of code?
Thank you very much,