From jhibschman at gmail.com  Wed Jun  9 16:09:19 2010
From: jhibschman at gmail.com (Johann Hibschman)
Date: Wed, 09 Jun 2010 09:09:19 -0500
Subject: [Rd] Extract/format/show for S4 objects
References: <u1oljapmxai.fsf@lx-chrateresearch01.citadelgroup.com>
	<AANLkTinv0WrHgXHiFfHUBO1s9EQvbdojApkTZAPYvo9j@mail.gmail.com>
Message-ID: <u1od3w0mh68.fsf@lx-chrateresearch01.citadelgroup.com>

Gabor Grothendieck <ggrothendieck at gmail.com> writes:

> The yearqtr class already rounds off automatically to avoid floating
> point effects and handles #1 and #2.

The main use for all this was so I could use quarters as index columns
with data.table, which demands integer storage mode.  (This is part of
my ongoing attempt to reinvent q/kdb+ in R.)

I've had some problems with yearmon's conversions in the past, so I'm
(probably unfairly) suspicious of the approach of storing dates as
floats.  To be fair, once I reported the bug, it was fixed almost
immediately; I was very impressed.

> On the other hand if you are just interested in playing around with S4
> for its own sake review the source code of the mondate package as an
> example of an S4 based date package.

Thanks, that's a very useful example.  I don't understand all of what's
going on in there, but I find it easier to understand the documentation
with an example in hand.

Cheers,
Johann



[Rd] Extract/format/show for S4 objects
Johann Hibschman