From l@wrence@mich@el @ending from gene@com  Tue Jun 26 20:40:17 2018
From: l@wrence@mich@el @ending from gene@com (Michael Lawrence)
Date: Tue, 26 Jun 2018 11:40:17 -0700
Subject: [Rd] list of methods
In-Reply-To: <bb6fa2$9mb1it@ironport10.mayo.edu>
References: <bb6fa2$9mb1it@ironport10.mayo.edu>
Message-ID: <CAOQ5NyfzhbMjYdVRRMkAWz-GqDxqyt5fRLB=V2Mc000+J1LVqg@mail.gmail.com>

While it's easy to conceive of a utility that found all generics for
which there is no non-default method for a given class vector, it's
not clear it would be useful, because it depends on the nature of the
object. Surv objects are vector-like, so they need to implement the
"vector API", which is not formally defined. You could look at the
S4Vectors package or the date/time classes for reference. But Surv
gets a lot less for free since length() returns twice their logical
length, an unfortunate inconsistency.

Michael



On Tue, Jun 26, 2018 at 11:24 AM, Therneau, Terry M., Ph.D. via
R-devel <r-devel at r-project.org> wrote:
> I recently got a request to add head() and tail() methods for Surv objects, which is quite
> reasonable, but not unlike other requests for logLik,  vcov, extractAIC, ...   What they
> all have in common is that are methods added since creation of the survival package, and
> that I didn't know they existed.
>
> To try and get ahead of the curve, is there a way to list names of all of the default
> methods?   There are functions to get all the instances of a method by name, e.g.
> methods("extractAIC") or find all the methods already implemented for a class, but I don't
> see something give me a list of the ones that I haven't created yet.
>
> Terry T.
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] list of methods
Michael Lawrence