The following solution will be fine so long as no Station has more than 26 Dates associated, as then we would run out of letters a-z
library(tidyverse)
(df_1 <- tibble::tribble(
~Station, ~Date, ~Depth,
"A1", "14/05/2021", 250L,
"A1", "19/05/2021", 250L,
"A2", "05/10/2021", 360L,
"A3", "16/08/2021", 360L,
"A4", "04/09/2021", 410L,
"A4", "04/09/2021", 230L
))
(df_2 <- group_by(df_1,
Station) |>
mutate(unique_station_name =ifelse(n()>1,
paste0(Station,"(",letters[row_number()],")"),
Station)))