Hi all,
This summer I've been working with a grad student to bring more of the
date time classes from JODA (http://joda-time.sourceforge.net/) into
R. To make these work seamlessly with existing date time objects, we
need to patch +.POSIXt. (The ruby community uses the term
monkey-patching for
From: r-devel-boun...@r-project.org [r-devel-boun...@r-project.org] On Behalf
Of Hadley Wickham [had...@rice.edu]
Sent: 10 September 2009 00:40
To: r-devel@r-project.org
Subject: [Rd] Monkey patching +.POSIXt
Hi all,
In desperation, I also tried
In this particular case, the trick is to assign the new version both into the
namespace and into the environment '.__S3MethodsTable__.' inside the
namespace.
The problem is +.POSIXt doesn't seem to be there:
exists(+.POSIXt, asNamespace(base)$.__S3MethodsTable__., inherits=F)
[1] FALSE
Hmmm... 'assign.to.base( +.POSIXt, myfun)' works on my system (2.9.1 patched
on Windows, at time of writing). Could be the 'mvbutils' version, I guess. What
happened when you tried it? And what if you did 'getAnywhere( +.POSIXt)'
afterwards?
I was wrong about where '+.POSIXt' lives, though--