Re: [R] UUIDgenerate() withn a s4 class produces the same uuid at each instance

2016-06-08 Thread Ben Tupper
Hi, I think your issue is that in the absence of an explicit 'initialize' method the value of id is assigned when you define the class prototype. All subsequent new instances will use that very same prototype value defined when you first defined the class. That's in the help for ?new, "The fu

[R] UUIDgenerate() withn a s4 class produces the same uuid at each instance

2016-06-08 Thread Servet Ahmet Çizmeli
Hello When I create a new instance of an S4 class in R, I would like the newly created object to have a unique id field. I try to achieve it through UUIDgenerate() from the uuid package. The problem is that I obtain the same UUID at every new object instance : library(uuid) setClass("C", re