ID Date Date2
1 1/1/2000 1/1/2000
2 NA 2/10/2000
3 2/2/1999 2/2/1999
4 NA 3/08/2020
The two date columns are dates obtained from two different dataframes. Because of the way the whole process works, sometimes a date is only entered into one of the dataframes.
What i did was merge the dataframes and above is an example of the result. My dataframes is a lot more than just 4 id's however. What i would like to do is replace the NAs with the dates of the column Date2, and leave the other dates alone.
I am dealing with a very large dataframe so typing out each individual cell doesn't work, i was wondering if there is a function that will do it in bulk based off the NA value, matching it to the corresponding Date2 column.