Displaying 2 results from an estimated 2 matches for "somes4class".
Did you mean:
someclass
2020 Sep 11
0
more Matrix weirdness
Abby, my answer was too concise. The thrust is that even if you define a method for
"[<-" with signature x="matrix" and value ="Matrix", for example, it will never be used since "matrix" is S3.
If instead x="someS4class" then the S4 method will be invoked.
There may be cases when changing the class of the left-hand side make sense (such as one subclass of "Matrix" to another) but certainly not for the base R vector classes.
Georgi Boshnakov
-----Original Message-----
From: Abby Spurdle <spur...
2020 Sep 11
2
more Matrix weirdness
> > "These operators are also implicit S4 generics, but as
> > primitives, S4 methods will be dispatched only on S4
> > objects ?x?."
> Yes, exactly, very well found, Georgi!
I'm sorry Martin, but I don't understand your point here.
I'm assuming that you want the (S3) matrix, x, to be converted to an
(S4) Matrix.
However, this is not a