Hello, Let us convert a vector to a time series object starting in 1978Q1: FRW<-ts(FRW0, frequency=4, start=c(1978,1)) FRW[3:6] represents the data from 1978Q3 to 1979Q2. Could we access the data by the time (1978Q3 to 1979Q2) instead of FRW[3:6]? Thanks, miao [[alternative HTML version deleted]]
Paul Hiemstra
2012-Feb-16 12:24 UTC
[R] How can we access element(s) of a time series object?
On 02/16/2012 08:08 AM, jpm miao wrote:> FRW<-ts(FRW0, frequency=4, start=c(1978,1))Please make your example reproducible, we do not have FRW0. cheers, Paul -- Paul Hiemstra, Ph.D. Global Climate Division Royal Netherlands Meteorological Institute (KNMI) Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39 P.O. Box 201 | 3730 AE | De Bilt tel: +31 30 2206 494 http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
R. Michael Weylandt
2012-Feb-16 14:17 UTC
[R] How can we access element(s) of a time series object?
?window may help. Michael On Thu, Feb 16, 2012 at 3:08 AM, jpm miao <miaojpm at gmail.com> wrote:> Hello, > > ? Let us convert a vector to a time series object starting in 1978Q1: > ? FRW<-ts(FRW0, frequency=4, start=c(1978,1)) > ? FRW[3:6] represents the data from 1978Q3 to 1979Q2. Could we access the > data by the time (1978Q3 to 1979Q2) instead of FRW[3:6]? > > ? Thanks, > > miao > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > 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.