i have a data frame df
date tss
2020-07-03 76
2020-07-03 49
2020-07-04 NA
2020-07-05 NA
2020-07-06 100
2020-07-06 76
2020-07-07 37
2020-07-08 104
2020-07-09 53
2020-07-10 116
2020-07-10 79
What I'm trying to achieve is to create a new column (tss2) that containts the value in the tss column if it's repeated twice for the same date.
i would imagine I would need to use Mutate with an if statement ?
example output i would like to achieve:
date tss tss2
2020-07-03 76
2020-07-03 49
2020-07-04 NA
2020-07-05 NA
date is classified as a date within the df
thank you