Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Renaud Gaujoux
All is clear now. Thank you for this clarification. Cheers, Renaud On 27/06/2011 15:38, Simon Urbanek wrote: On Jun 27, 2011, at 8:43 AM, Renaud Gaujoux wrote: On 27/06/2011 14:27, Simon Urbanek wrote: On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: On 24/06/2011 22:04, John Chambers wr

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Simon Urbanek
On Jun 27, 2011, at 8:43 AM, Renaud Gaujoux wrote: > > On 27/06/2011 14:27, Simon Urbanek wrote: >> On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: >> >>> On 24/06/2011 22:04, John Chambers wrote: Strictly speaking, that is not meaningful. A class (like any R object) is uniquely

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Renaud Gaujoux
On 27/06/2011 14:27, Simon Urbanek wrote: On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: On 24/06/2011 22:04, John Chambers wrote: Strictly speaking, that is not meaningful. A class (like any R object) is uniquely referenced by a name *and an environment*. The name of a package can be

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Simon Urbanek
On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: > > On 24/06/2011 22:04, John Chambers wrote: >> >> Strictly speaking, that is not meaningful. A class (like any R object) is >> uniquely referenced by a name *and an environment*. The name of a package >> can be used to construct the enviro

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Renaud Gaujoux
On 24/06/2011 22:04, John Chambers wrote: Strictly speaking, that is not meaningful. A class (like any R object) is uniquely referenced by a name *and an environment*. The name of a package can be used to construct the environment, but your "character slot" won't identify a class reliably

Re: [Rd] Class not found when search in .onLoad

2011-06-24 Thread John Chambers
On 6/24/11 12:53 AM, Renaud Gaujoux wrote: Thank you John for your response. Things are a little bit more complicated though. The inheritance checks are not only made in .onLoad, they are part of a class validity method, which is called in .onLoad because some objects from this class are created

Re: [Rd] Class not found when search in .onLoad

2011-06-24 Thread Renaud Gaujoux
Thank you John for your response. Things are a little bit more complicated though. The inheritance checks are not only made in .onLoad, they are part of a class validity method, which is called in .onLoad because some objects from this class are created at this stage. Such objects can also be

Re: [Rd] Class not found when search in .onLoad

2011-06-23 Thread John Chambers
The workaround is to use the package's namespace, as you did. That's one of the reasons why pkgname is an argument to .onLoad(). Depending on what you want to do, you can either use the namespace as an argument where= or get the class definition from the namespace and use it in place of the c

[Rd] Class not found when search in .onLoad

2011-06-23 Thread Renaud Gaujoux
Hi, I am facing with a strange behaviour of isClass and extends when these are called in .onLoad in both R 2.12.1 and R 2.13.0. This is preventing my package from doing some object initializations at a proper place (i.e. in .onLoad). Suppose one defines two S4 classes in a package, and that