[R] Construct time series objects from raw data stored in csv files

Gabor Grothendieck ggrothendieck at gmail.com
Thu Apr 12 21:41:41 CEST 2007


On 4/12/07, tom soyer <tom.soyer at gmail.com> wrote:
> Thanks Gabor!
>
> I think your example works, but check this out:
>
> > as.ts(z)
>       Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
> 1921 19.0 18.4 18.3 18.1 17.7 17.6 17.7 17.7 17.5 17.5 17.4 17.3
> 1922 16.9 16.9 16.7 16.7 16.7 16.7 16.8 16.6 16.6 16.7 16.8 16.9
> > is.ts(z)
> [1] FALSE

The above outputs as.ts(z) on the console.  If you want to
assign it to a variable you need to do so:

tz <- as.ts(z)
is.ts(tz) # TRUE



More information about the R-help mailing list