Re: [R] S3 and S4 clash

2007-12-12 Thread Spencer Graves
Dear Prof. Ripley: Thanks for your help. I very much appreciate your great generosity in both your substantive contributions to the code and documentation for R and in responding to so many questions, helping to make R what it is today. In the real application that led to the to

Re: [R] S3 and S4 clash

2007-12-06 Thread Prof Brian Ripley
I'd say that was pretty clearly a bug in stats4 (which as I recall was needed to get around the scoping awkwardnesses of S4). But could you not write a logLik method for your class? E.g. > logLik.bar <- function(object, ...) structure(pi, class="logLik", df=1) > AIC(bar.tmp) [1] -4.283185 > lib

[R] S3 and S4 clash

2007-12-06 Thread Spencer Graves
Hello: How can I work around the conflict between the S3 and S4 illustrated in the example below? I'm developing a package that requires a function in 'stats4', but when 'stats4' is attached, it breaks my AIC function. I could give my AIC function another name so it no longer uses the