Considering the following example vector (class is numeric):
dates <- data.frame(A = c(2021, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2023,
2023, 2023, 2023, 2024, 2025, 2025, 2025, 2025), B = "something")
I want to remove any of the daes that are repeated:
dates <- data.frame(A = c(2021, 2022, NA, NA, NA, NA, NA, NA, NA, 2023,
NA, NA, NA, 2024, 2025, NA, NA, NA), B = "something")