[R] Date format on x-axis
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Aug 17 13:54:35 CEST 2007
If you want to use English, you need to set your session to be use
English.
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
We need to know your OS and locale, and you did not follow the guide.
On a Unix-alike probably Sys.setlocale("LC_TIME","en_US") or
Sys.setlocale("LC_TIME", "en_US.utf8") is needed. On Windows
Sys.setlocale("LC_TIME", "en").
On Fri, 17 Aug 2007, inaki at goisolutions.net wrote:
> Dear R users,
>
> Plotting question from a R beginner...
>
> When I try to plot a response through time, for example:
>> Date<-c("2006-08-17", "2006-08-18", "2006-08-19", "2006-08-20")
>> response<-c(4,4,8,12)
>> as.Date(Date)
I presume that was Date <- as.Date(Date)
>> plot(Date,response)
>
> The dates on the graphic appear in spanish. This I guess is the default
> way of plotting because my windows is in spanish, but I need a "aug 17"
> instead of "ago 17" (agosto is the spanish for august)...
> I've tried,
>> format(Date, "%m %d")
> And although it does change the way Date is listed, well it's still
> plotted in spanish...
> I've also searched through par() settings, but xaxp,xaxs, xaxt, xpd and
> xlog do not solve my problem...
>
> Could anyone help me solve this format question?
>
> Thanks a million in advance,
>
> Greetings,
> Iñaki Etxebeste Larrañaga
> M.Sc. Biologist
> Producción Vegetal y Recursos Forestales
> ETSIIAA Universidad de Valladolid
> Avda. Madrid,57
> 34071 Palencia (Spain)
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list