On 4/26/05, Fernando Saldanha <fsaldan1@gmail.com> wrote: 
> 
> I noticed that when one tries to extend a time series (ts) object by a
> single period using window() actually two observations (NAs) are
> added. See below for an example. Does anyone know the reason for this
> behavior and how to avoid it?
> 
> Thanks.
> 
> FS
> 
> > x<-ts(c(1,2,3))
> > x1<- window(x, start(x), end(x) + 1, extend = TRUE)
> > x1
> Time Series:
> Start = 1
> End = 5
> Frequency = 1
> [1] 1 2 3 NA NA

  Another way to do it is:
 ts(c(x, NA), start = start(x), freq = frequency(x))

	[[alternative HTML version deleted]]


