Laurent Gautier
2004-Nov-17 08:32 UTC
[Rd] bug in methods' 'initialize' (or the functions called in turn) ?
Hi, I experience a very strange behaviour when trying to instanciate a S4 class. A call like 'r <- new("MyClass", foo="bar")' returns apparently cleanly, but in fact a subsequent use of 'r' results in a 'r does not exist error message'. After a bit of hunting with 'debug', it seems that the bug is in 'initialize' (or one of the functions it calls in turn). All this while using R-devel from Nov. 16th (R-2.0.1-devel). I did manage to make a simple example to reproduce the bug, but to do so one needs few packages from the bioconductor project. If this is not yet know and one shows interest, I can provide the few lines of code needed to reproduce it. L.
Uwe Ligges
2004-Nov-17 11:04 UTC
[Rd] bug in methods' 'initialize' (or the functions called in turn) ?
Laurent Gautier wrote:> Hi, > > I experience a very strange behaviour when trying to instanciate a S4 > class. A call like 'r <- new("MyClass", foo="bar")' returns apparently > cleanly, but in fact a subsequent use of 'r' results in a 'r does not > exist error message'. After a bit of hunting with 'debug', it seems that > the bug is in 'initialize' (or one of the functions it calls in turn). > All this while using R-devel from Nov. 16th (R-2.0.1-devel). > > I did manage to make a simple example to reproduce the bug, but to do so > one needs few packages from the bioconductor project. If this is not yet > know and one shows interest, I can provide the few lines of code needed > to reproduce it.Two points: a) yes, please alsways specify a simple reproducible example when talking about a "bug"; b) if this "bug" does not appear in R-2.0.1 but only in the current R-devel, it might be worth to wait a couple of days. Perhaps someone is including some new functionality and has not yet finished the updates. Uwe Ligges> > L. > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Reasonably Related Threads
- include a class file for access to an object
- Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?
- Inconsistent behavior for the C AP's R_ParseVector() ?
- Question about copying reference objects using the initialize method
- Inconsistent behavior for the C AP's R_ParseVector() ?