I want to replace NA in a df column with date from another column + 23:59:59. Below is the sample data and my code. I'm facing issues in doing this. Any lights here..?
code:
df1[is.na(df1$start_time)] <- as.character(paste(dfs$Date,"23:59:59",sep=" "))
df1:
Date start_time
5/30/2020 NA
5/30/2020 30/05/2020 07:33:12
5/30/2020 NA
5/30/2020 30/05/2020 09:33:12
Output needed:
Date start_time
5/30/2020 30/05/2020 23:59:59
5/30/2020 30/05/2020 07:33:12
5/30/2020 30/05/2020 23:59:59
5/30/2020 30/05/2020 09:33:12