[Rd] S4 dispatch for .DollarNames (utils)

Claudia Beleites cbeleites at units.it
Sun May 30 17:08:28 CEST 2010


Dear all,

thank your for this discussion - I had been wondering how to get the completion 
with my S4 class, but it didn't bother me enough to dig into things.

> The workaround/hack that *does* work now, I believe, is to insert a 
> dummy S3 class into the mix and define the S3 .DollarNames method for it.
> 
> Example:
>  > setOldClass("foo3")
>  > .DollarNames.foo3 <- function(x, pattern)"bar"

My question here is: what is the dummy class needed for?

I have a few S3 methods for my S4 class (rbind.hyperSpec, cbind.hyperSpec, and 
now .DollarNames.hyperSpec). They seem to work just fine without first setting 
up a dummy S3 class that is then used in the contains of the S4 definition.
Any pitfalls with that?

Claudia



-- 
Claudia Beleites
Dipartimento dei Materiali e delle Risorse Naturali
Università degli Studi di Trieste
Via Alfonso Valerio 6/a
I-34127 Trieste

phone: +39 0 40 5 58-37 68
email: cbeleites at units.it



More information about the R-devel mailing list