Like my previous comment, here is a complete and verified answer. As I said, you need to set locale to the right for your data (in this case, Spanish).
The code that allows this is as follows:
Sys.setlocale(locale="es_ES.UTF-8")
you can see the full list of available locale with system("locale -a", intern = TRUE) (not sure if it works well on Windows systems).
Here is an example:
x <- c("03-Ago-2011", "21-Ene-2012") as.Date(x, format = "%d-%b-%Y") [1] "2011-08-03" "2012-01-21"
source share