[R] Read date for timeserie object

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Aug 21 17:47:23 CEST 2003


Objects of class ts are for regualrly spaced time series only.  What you 
have is an irregular time series.

On Thu, 21 Aug 2003, Jan Verbesselt wrote:

> Dear all,
> 
> Is there a simple trick to read in data with the following format and
> create a Time Serie object of it?
> 
> Date	CountOfField2
> 5/10/1998	7
> 5/11/1998	5
> 5/12/1998	2
> 5/14/1998	1
> 5/15/1998	1
> 5/19/1998	1
> 5/20/1998	1
> 5/21/1998	1
> 5/24/1998	2
> 5/25/1998	1
> 5/26/1998	2
> ....
> 2002
> ...

And what does `2002' mean here?

> R should recognize that some dates are not available...(NA). You can
> define start and end date Ok, and frequency= 365 is ok...but is it
> possible that recognizes the gaps?

R does what you program it to do, and you could instruct it to do this.

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