I have a dataframe in R with more than 20 columns and a few million rows. For a given id, the dataframe can have about 100 observations. The way I have created this dataframe is by merging two data frames. So for a given id, for a column say date, even if one of the values is not NA, then I want to replace all NA values in the date column for that id with the value I found. This column is generated by me in some other code so it can have either a single unique value or NA and nothing else.
The closest similar question I could find was this