[R] Windowing Time Series in The Past
Bert Gunter
bgunter.4567 at gmail.com
Sun Apr 2 00:32:10 CEST 2017
?ts
tells you exactly how to do this.
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Apr 1, 2017 at 1:37 PM, Lorenzo Isella <lorenzo.isella at gmail.com> wrote:
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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