Skip to content
Prev 17509 / 63421 Next

Month recognition issue

Dear all,

I am running
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.1.1  (2005-06-20), ISBN 3-900051-07-0
Under Mac os X, a french version!

I am preparing a package and I got the following issue

I am trying to read dates that are written in 
english and have them recognized by R using 
as.Date function.

I realized strangely that when I type
[1] "Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct"
[11] "Nov" "Dec"

I get the abbreviated english version of every month
[1] "1960-01-01" NA           "1960-03-31" NA
  [5] NA           NA           "1960-07-30" NA
  [9] "1960-10-01" "1960-10-30" "1960-11-30" NA

It is only once I have found through trial an 
error the french abbreviation, that I got a match 
for every month.
[1] "1960-01-01" "1960-02-02" "1960-03-31" "1960-04-30"
  [5] "1960-05-02" "1960-07-01" "1960-07-30" "1960-08-02"
  [9] "1960-10-01" "1960-10-30" "1960-11-30" "1960-12-30"

I got simply two questions:

First, why since R was install on a french system 
the month.abb command didn't give me the french 
abbreviations.

Secondly, since I am producing a package, I would 
like to know how can I tell R  to momentairly use 
the english abbreviations instead of the french 
ones...

Thanks a lot

--