I am currently developping Reference classes (R5) for large objects which take time to produce, and i wonder if someone knows a better way to develop methods than redefining the class with setRefClass and reproduce an object each time i update a method.
In other words : can the methods of an existing Reference class object be redefined ?
I had considered doing the following:
I believe you can overwrite the previous method in the class using
class$methods(
, then you can set a new object from your redefined class and import the old object. I would note:"All methods for a class should be defined in the source code that defines the class, typically as part of a package. In particular, methods can not be redefined in a class in an attached package with a namespace: The class method checks for a locked binding of the class definition." from
?setRefClass
also.