2. Create an instance of the S4 class (let's call it A).
3. Redefine the S4 class.
4. Examine A.
R complains that there's an error in slot(object, what), because A is missing a slot from the (re)definition of the S4 class.
This is promising, in that R realizes that A is supposed to be an instance of the redefined class. So far, so good.
What I would expect to see next is that either R automatically reinitializes A with the new slot (it has exactly as much information about the new slot as it had about the old ones when I created A), or, if it wants intervention from me, it presents an interactive session I can use to tell it how to initialize the new slots.
It didn't do that, but maybe I just don't have the options configured properly to make it happen.
Smalltalk and Common Lisp meet my expectations: they notice that A is an instance of a redefined class and they either reinitialize the instance automatically, or they present an interactive session that I can use to tell them how to do it.
It's entirely possible that R has this feature and I'm just missing it because I'm a noob.
1. Define an S4 class.
2. Create an instance of the S4 class (let's call it A).
3. Redefine the S4 class.
4. Examine A.
R complains that there's an error in slot(object, what), because A is missing a slot from the (re)definition of the S4 class.
This is promising, in that R realizes that A is supposed to be an instance of the redefined class. So far, so good.
What I would expect to see next is that either R automatically reinitializes A with the new slot (it has exactly as much information about the new slot as it had about the old ones when I created A), or, if it wants intervention from me, it presents an interactive session I can use to tell it how to initialize the new slots.
It didn't do that, but maybe I just don't have the options configured properly to make it happen.
Smalltalk and Common Lisp meet my expectations: they notice that A is an instance of a redefined class and they either reinitialize the instance automatically, or they present an interactive session that I can use to tell them how to do it.
It's entirely possible that R has this feature and I'm just missing it because I'm a noob.