[R] Month name in English, not R running language

Marc Girondot marc_grt at yahoo.fr
Tue Jan 15 07:28:20 CET 2013

When ploting a timeseries, the months are shown with abbreviation in the 
current language of the system.
For example,
x <- seq(from=as.Date("2000-04-01"), length.out=100, by=1)
y <- rnorm(length(x), 5,2)
plot(x, y)

Show for me "avi mai jui jul" as I use R with French language localization.

I see in the Windows FAQ how to completely change the language of R, but 
I search rather a way to change it for just the next command (also I run 
R in MacOS !).

The solution will be to make myself the axis... except if someone has 
the trick to do it more easily.

To generate the axis myself, it is not so simply to get one tick by 
month. I try
axTicks(1) but it gives 5 ticks rather than 4


 > as.Date(axTicks(1), "1970-01-01")
[1] "2000-04-13" "2000-05-03" "2000-05-23" "2000-06-12" "2000-07-02"
Is not what I expected. Plot with date object seems to use a special way 
to generate ticks.

Thanks a lot


Marc Girondot, Pr

Laboratoire Ecologie, Systématique et Evolution
Equipe de Conservation des Populations et des Communautés
CNRS, AgroParisTech et Université Paris-Sud 11 , UMR 8079
Bâtiment 362
91405 Orsay Cedex, France

Tel:  33 1 (0)   Fax: 33 1 (0)
e-mail: marc.girondot at u-psud.fr
Web: http://www.ese.u-psud.fr/epc/conservation/Marc.html
Skype: girondot

More information about the R-help mailing list