search for: iqtrs

Displaying 1 result from an estimated 1 matches for "iqtrs".

Did you mean: intrs
2010 Jun 08
2
Extract/format/show for S4 objects
...iq <- as.integer(floor((as.numeric(x) - 2000) * 4 + 0.0001)) new("iqtr", iq) } setMethod("show", "iqtr4", function (object) { cat(format(yearqtr(as.numeric(x) * 0.25 + 2000))) }) I have two issues: 1. Vectors of iqtrs do not display properly. They print, but they don't look like vectors. > iq <- iqtr(seq(2000, 2002, 0.25)) > iq 2000 Q2 2000 Q2 2000 Q3 2000 Q4 2001 Q2 2002 Q1> 2. Subsets do not stay in the class. > iq[1:2] > [1] 0 1 Clearly, I'...