Re: [Rd] setGeneric for residuals, etc

2011-01-24 Thread Martin Morgan
On 01/24/2011 08:37 AM, Kasper Daniel Hansen wrote: > Johann, > > whether S4 is "better" than S3 is a heated subject. No-one (I think) > disputes that S4 is in some sense more flexible (for some suitable > definition of flexible), but it does incur some performance overhead > (how much is debatab

Re: [Rd] setGeneric for residuals, etc

2011-01-24 Thread Kasper Daniel Hansen
Johann, whether S4 is "better" than S3 is a heated subject. No-one (I think) disputes that S4 is in some sense more flexible (for some suitable definition of flexible), but it does incur some performance overhead (how much is debatable) and some would argue that it also makes code more complicate

Re: [Rd] setGeneric for residuals, etc

2011-01-24 Thread Johann Hibschman
"Janko Thyson" writes: >> I'm experimenting with a few model-fitting classes of my own. I'm >> leaning towards using S4 for my classes, but the R functions I'd want >> to override (residuals, predict, etc.) are all S3 methods. > For example, inside your method for 'residuals()', you will > prob

Re: [Rd] setGeneric for residuals, etc

2011-01-21 Thread Janko Thyson
> -Ursprüngliche Nachricht- > Von: r-devel-boun...@r-project.org [mailto:r-devel-bounces@r- > project.org] Im Auftrag von Johann Hibschman > Gesendet: Donnerstag, 20. Januar 2011 16:25 > An: r-de...@stat.math.ethz.ch > Betreff: [Rd] setGeneric for residuals, etc > >

[Rd] setGeneric for residuals, etc

2011-01-20 Thread Johann Hibschman
I'm experimenting with a few model-fitting classes of my own. I'm leaning towards using S4 for my classes, but the R functions I'd want to override (residuals, predict, etc.) are all S3 methods. As I understand it, I could do setGeneric("residuals"), then add S4 specializations to it. However, I