search for: unique_

Displaying 1 result from an estimated 1 matches for "unique_".

Did you mean: unique
2008 Jun 19
2
S4 pass-by-value work-around?
...meric" ), prototype( parameters=matrix(numeric(0),0,0), uniqueCount=1 ) ) setGeneric("createUniqueName", function(object) standardGeneric("createUniqueName")) setMethod("createUniqueName", "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 happe...