[R] finding out if a method exists
murdoch.duncan at gmail.com
Tue Mar 28 15:11:46 CEST 2017
On 28/03/2017 8:53 AM, Therneau, Terry M., Ph.D. wrote:
> I'm thinking of adding a new "cmatrix" function/method to the survival package but before
> I do I'd like to find out if any other packages already use this function name. The
> obvious method is to look at the NAMESPACE file for each package in CRAN and read the
> export list.
> This is the kind of task for which someone, somewhere will have written routines. I just
> don't know who or where.
> Any hints?
Google is pretty good at finding documentation. Since CRAN won't let
you publish a package that exports a function without documenting it,
that's probably good enough (though it will lead to a few false
positives, e.g. multcomp::simtest has an argument named cmatrix).
I don't see a cmatrix function in a Google search.
I happen to have a copy of all CRAN packages on my system, and searching
the NAMESPACE files finds no cmatrix, but it does find ibd::Cmatrix. So
I think you're safe.
More information about the R-help