My date format is "Sat 12 Sep" as character. I want to transform it into Date format in a new column called DATE.
mutate(DATE = (as.Date(FECHA, "%a %d %b")))
but it returns NA
X FECHA LOCAL RESULT VISITANTE DATE
<int> <chr> <fct> <fct> <fct> <date>
1 3 **Sat 12 Sep** Eibar 0 - 0 Celta Vigo NA
2 4 Sat 12 Sep Granada 2 - 0 Athletic Bilbao NA
Thanks
I would recommend looking at the lubridate package. It will add 2020 as the year automatically (be careful if that is not what you want).
See if this works for you: