Displaying 1 result from an estimated 1 matches for "shab".
Did you mean:
sha1
2010 Nov 23
1
Reference Classes: removing methods -> implications for objects/instances of that class
...registered a method and want to 'unregister' (i.e. remove) this method
again, objects/instance created of the respective class still feature the
removed method until I do an explicit reassign ('my.instance <-
getRefClass("Classname")$new()'), right?
setRefClass("Shab", fields=list(a="numeric"))
# Register method
getRefClass("Shab")$methods(list(aSquare=function() a^2))
getRefClass("Shab")$methods()
# Create instance
shab <- getRefClass("Shab")$new()
shab$a <- 10
# Use method
shab$aSquare()
# Remove method...