At 10:52 22/09/2004, [EMAIL PROTECTED] wrote:
I think, it must be x instead of object?

setMethod("length", signature(x="Collection"), function(x) length([EMAIL PROTECTED]))

Hi,

This is right, this latest works - Thank you.

For "show" methods, I did understand I had to use "object" with

---
> getGeneric("show")
standardGeneric for "show" defined from package "methods"

function (object)
standardGeneric("show")
<environment: 017E6D18>
Methods may be defined for arguments: object
---

I didn't have the same information for "length"... except in the help page of the function length which provides the list of its arguments, so that I should have found that myself.
Anyway, thank you very much: now at least I have understand that argument names must exactly match argument names of the generic and my knowledge of S4 classes is better.


Eric

______________________________________________
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to