[R] plot x-axis DateTime NOT evenly spaced

Uwe Ligges ligges at statistik.tu-dortmund.de
Mon Jan 7 11:29:11 CET 2013



On 07.01.2013 09:55, ishi soichi wrote:
> R-64 latest
>
> Hi. I am trying to plot a set of csv data, which looks like
>
>> head(interval)
>                         date inteval
> 1 2012-07-01 00:57:54 +0900     156
> 2 2012-07-01 01:07:41 +0900     587
> 3 2012-07-01 01:09:31 +0900     110
> 4 2012-07-01 01:18:42 +0900     551
> 5 2012-07-01 01:39:01 +0900    1219
> 6 2012-07-01 01:40:40 +0900      99
>
> as you can see, more than one event happens each day, and they are not
> evenly spaced.  Obviously hours, minutes and seconds are important for the
> plot.
>
> I tried
>
> interval$date <- as.Date(interval$date, "%Y-%m-%d %H:%M:%S +0900")
>
> but this chops the time off.
>
> Could anyone show me how to plot data with x values as Date(or Time)
> objects?


See ?strptime

Best,
Uwe Ligges






> soichi
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org 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.
>




More information about the R-help mailing list