Displaying 1 result from an estimated 1 matches for "unique_1".
Did you mean:
unique_x
2008 Jun 19
2
S4 pass-by-value work-around?
...ot;, "MyMatrix", function(object){
retval <- paste("unique_", object at uniqueCount, sep="")
object at uniqueCount <- object at uniqueCount + 1
return(retval)
})
x <- new("MyMatrix", parameters=matrix(0, 2, 2))
createUniqueName(x) # returns "unique_1"
x # x at uniqueCount is still 1
I understand why this is happening, but am wondering how people in the
community have dealt with it, specifically when using S4. Any advice would
be appreciated. Also, I am aware that this is somewhat of a silly example,
but it should allow you to see what I...