[R] How to use as.Date (or something else) with "31-Jul-2010 23:59:00"

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jul 29 14:28:31 CEST 2011


On Thu, Jul 28, 2011 at 6:54 PM, Eduardo M. A. M.Mendes
<emammendes at gmail.com> wrote:
> Hello
>
> Many thanks.
>
> Sorry for not replying earlier but I have followed advice and read as much
> documentation as I could.
>
> I managed to get a zoo object the way I want
>
> dadoszoo : 'zoo' series from 2010-06-27 to 2010-08-05
>  Data: num [1:56161, 1:14] 74 74.2 74.2 74.1 73.9 ...
>  Index:  POSIXct[1:56161], format: "2010-06-27 00:00:00" "2010-06-27
> 00:01:00" ...
>
> I did not manage to get  plot.zoo to give x-axis a nice format (I only got
> Jun 30 Jul10 Jul 20 Jul 30).  I guess the way to change it is the
> documentation too but I am yet to find it.
>
> Many thanks
>

Two things to try:

1. Try xyplot.zoo.  See ?xyplot.zoo for a another way.

2. plot.zoo uses axis from the core of R to draw the axes.   You can
call axiss yourself to customize as shown in the example section of
?plot.zoo.  Also see ?axis


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list