Re: [Rd] group generics

From: Ross Boylan <>
Date: Thu, 03 Dec 2009 13:35:02 -0800

Thanks for your help. I had two concerns about using as: that it would impose some overhead, and that it would require me to code an explicit conversion function. I see now that the latter is not true; I don't know if the overhead makes much difference.

On Thu, 2009-12-03 at 13:00 -0800, Martin Morgan wrote:
> setMethod("Arith", signature(e1="numeric", e2="B"), function(e1, e2) {
> new("B", xb=e1*e2@xb, callGeneric(e1, as(e2, "A")))
> })

Things were getting too weird, so I punted and used explicitly named function calls for the multiplication operation that was causing trouble.

Ross mailing list Received on Thu 03 Dec 2009 - 21:47:26 GMT

This archive was generated by hypermail 2.2.0 : Thu 03 Dec 2009 - 23:11:03 GMT