[R] Date format on x-axis

inaki at goisolutions.net inaki at goisolutions.net
Fri Aug 17 13:11:23 CEST 2007


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)
>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)



More information about the R-help mailing list