[R] Windowing Time Series in The Past

Lorenzo Isella lorenzo.isella at gmail.com
Sat Apr 1 22:37:57 CEST 2017


Dear All,
I am sure the solution is a one liner, but I am a bit struggling.
Given a time series which starts at a given time t_ini, I would like to set
a initial start time farther away in the past and have NA before t_ini
(I need this to align different time series).
For instance


d<-ts(seq(20), start=1986)

I would like e.g. d to start at 1980 and consist of NA's before 1986.
Ho can I achieve that?
Many thanks

Lorenzo



More information about the R-help mailing list