search for: integerwithunits

Displaying 3 results from an estimated 3 matches for "integerwithunits".

2017 Sep 23
1
S4 method implementation for S3 class
> There is formally no such thing as an S3 class. Just S3 objects with a > class attribute. You could extend a base class with an S4 class, like > setClass("IntegerWithUnits", slots=c(units="Units"), > contains="integer"). Sure, that's a disruptive change, but it would be > in the right direction. > > Extending base classes is always a risky proposition, as you've > discovered. Ideally you would override every transformat...
2017 Sep 22
2
S4 method implementation for S3 class
2017-09-22 19:04 GMT+02:00 Michael Lawrence <lawrence.michael at gene.com>: > The %*% function is a primitive. As it says in the documentation under > ?Methods_Details > > Methods may be defined for most primitives, and corresponding > metadata objects will be created to store them. Calls to the > primitive still go directly to the C code, which will
2017 Sep 22
0
S4 method implementation for S3 class
...ould be a pitty if > we have to switch everything to S4 just to show a warning. Clearly > overkilling. Isn't there another way? > There is formally no such thing as an S3 class. Just S3 objects with a class attribute. You could extend a base class with an S4 class, like setClass("IntegerWithUnits", slots=c(units="Units"), contains="integer"). Sure, that's a disruptive change, but it would be in the right direction. Extending base classes is always a risky proposition, as you've discovered. Ideally you would override every transformation in order to adjust o...