Displaying 1 result from an estimated 1 matches for "flipflag".
Did you mean:
flip_flag
2004 Sep 03
0
Changing the value of an object's slot in a method
...:
X-Spam-Status: No, hits=0.2 required=5.0 tests=BAYES_50,NO_REAL_NAME autolearn=no version=2.63
Hi all,
I want to modify the value of an object's slot from within a method, as in the example below:
setClass("MyClass", representation(flag="numeric"))
if( !isGeneric("flipFlag") )
setGeneric("flipFlag", function(object)
standardGeneric("flipFlag"))
setMethod("flipFlag","MyClass",
function(object) {
# flips object at flag from 0 to 1, or from 1 to 0
})
This should work in a s...