[R] Time series

Achim Zeileis Achim.Zeileis at uibk.ac.at
Wed Apr 2 08:26:29 CEST 2014


On Tue, 1 Apr 2014, Marlin Keith Cox wrote:

> A simplified ask is:  when I use the time series plot function, R treats
> each time on 9/19/13 as an individual day, when clearly it isn't.

The "ts" class can handle only regular time series. See the "zoo" or "xts" 
packages for dealing with time series that have an irregular time index. 
Here, you could use POSIXct or chron time stamps.

> Thank you ahead of time.  Keith
>
> ts(chum)
> with(chum,plot.ts(Time,PA))
>
> Chum<-
>
>  Time PA  9/18/13 18:29 16  9/19/13 13:29 14  9/19/13 16:29 13.2  9/19/13
> 17:29 13.1  9/19/13 18:29 13  9/20/13 18:29 12  9/21/13 18:29 10  9/22/13
> 18:29 9  9/23/13 18:29 7  9/24/13 18:29 5  9/25/13 18:29 3  9/26/13
> 18:29 2  9/27/13
> 18:29 1
>
>
> M. Keith Cox, Ph.D.
> Principal
> MKConsulting
> 17105 Glacier Hwy
> Juneau, AK 99801
> U.S. 907.957.4606
>
> 	[[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