[Rd] R reference classes - how to extend a generator object?
milo
milo.chen at outlook.com
Thu Jan 23 13:42:21 CET 2014
Hello,
I want to extend a generator object, but all the R help files have on this
subject is:
"Note that if one wanted to extend the reference class generator capability
with a subclass, this should be done by subclassing 'refGeneratorSlot', not
'refObjectGenerator'."
OK, but how do you actually do this? So I've tried:
MyGenerator <- setRefClass("MyGenerator",
contains = "refGeneratorSlot",
methods = list(
new = function(...) {
message("Hello, I'm being instantiated now!")
callSuper(...)
}
)
)
but now what? How do I actually use this in conjunction with my class
definitions that use setRefClass()?
Many thanks,
M
--
View this message in context: http://r.789695.n4.nabble.com/R-reference-classes-how-to-extend-a-generator-object-tp4684029.html
Sent from the R devel mailing list archive at Nabble.com.
More information about the R-devel
mailing list