[Rd] methods package
John Chambers
jmc at r-project.org
Thu Mar 5 18:08:57 CET 2009
Hi Terry,
Terry Therneau wrote:
> I'm working on the next version of coxme, one step of which is converting
> the bdsmatrix library from Splus to R. Actually, it is a conversion from
> S4 methods as first described in the Green book to S4 methods as they
> currently exist. Mostly it's going ok, but not entirely.
>
> 1. The biggest issue is lack of documentation. The online help pages have
> not been a help; they keep saying it's "as found in the green book - almost".
> I've looked for the package on CRAN in the hopes for more there, but can't
> find it. Perchance there is something obvious that I am missing?
>
Well, one is that there is a 2008 book, "Software for Data Analysis",
that I wrote partly to describe this and other topics from an R
perspective. It's a reference on most pages of documentation related to
methods (in R version 2.8.1; you should be using that and/or the r-devel
version if you're revising a package).
John
> 2. The changes are small but numerous. The current one that has me puzzled
> is a method for addition:
> setMethod(Ops, signature=c('numeric', 'bdsmatrix'), ....
>
> Let xmat be ordinary and bmat be a bdsmatrix. In the old code "xmat + bmat"
> fell to this method (which knows what to do), in the current R I get
> failure due to no method found. is.numeric(xmat) is TRUE.
> What is the fix?
>
> 3. In the green book the examples used .Dim and .Dimnames slots, the Matrix
> library uses Dim and Dimnames. Is there a good reason to choose one or the
> other?
>
> I'll be out of town for the next few days (son's wedding) so instant response
> is not necessary.
>
> Terry Therneau
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>
More information about the R-devel
mailing list