Since nobody else has respond, I thought I'd take a stab. Maybe if I'm
wrong enough somebody will correct me, but my understanding is that that
kind of situation, ie the pain of getting the correct method called when
there is a dependency on the type of more than one argument is part of the
motiva
Okay, I found something that is working, but it looks and feels pretty
awkward as the method def and method lookup takes place in one function ;-)
setRefClass("A", fields=list(X="numeric"))
setRefClass("B", contains="A", fields=list(Y="character"))
mySetAs <- function(
from,
to
){
Somehow I don't see my own postings in the list, so sorry for replying
to my own message and not the one that went out to the list.
I got a little further and I think I found exactly the thing that is
bothering me: how to get "extended" method dispatch going in 'setAs()':
setRefClass("A", field
Dear list,
I wonder how to write methods for the function 'as' in the sense that I
can call 'as(object, Class, strict=TRUE, ext)' and let method dispatch
figure out the correct method.
AFAIU, there is a difference between, e.g. 'as.data.frame' and the
methods of 'as()' as stated above since th
4 matches
Mail list logo