I would like to create a S4 method 'myMethod' that dispatches not only on the class of the first argument of the function, but also on the value of one of the slot of this class.
for instance
myObject:
@slot1="A"
@...
I would like myMethod(myObject) to returns something different for slot1="A" and slot2="B".
Can I avoid to hardcode the 'if' in the code of 'myObject'?