How to change the format of abbreviated month with a ending dot in my software R? -
i peruvian , i'm learning program in r
when convert character date using function as.date na. because abbreviated month not have point (jul. sep.)
fecha<-c("06-jul-2015","06-sep-2012")
as.date(fecha, format="%d-%b-%y")
[1] na na
please. how can r consider abbreviated month without point?
thank much
i had same problem yesterday. added following line
sys.setlocale("lc_time", "c") fecha<-c("06-jul-2015","06-sep-2012") as.date(fecha, format="%d-%b-%y")
and works:
"2015-07-06" "2012-09-06"
edit: spanish , dot in comment:
sys.setlocale("lc_time","spanish") fecha<-c("06-ene.-2015","06-dic.-2012") as.date(fecha, format="%d-%b.-%y")
Comments
Post a Comment