[R] xts Annual series
michael.weylandt at gmail.com
Tue Apr 8 22:27:02 CEST 2014
On Apr 8, 2014, at 15:15, Erin Hodgess <erinm.hodgess at gmail.com> wrote:
> If I have the following:
> x <- as.yearqtr(2000 + seq(0,7)/4)
>  "2000 Q1" "2000 Q2" ...
> which is as it should be.
> Then if I set up time as
> time <- xts(1:8,x)
> 2000 Q1 1
> 2000 Q2 2
> 2000 Q3 3
> Also fine
> Now suppose I want to have an annual xts object. How do I go about setting
> that up, please?
Not quite as transparently. R does not (to my knowledge) have a commonly used 'year' class.
You can of course use yearqtr objects and skip 3/4 per year.
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: erinm.hodgess at gmail.com
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> 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