Duncan Murdoch wrote:
> 
> In the little orientation data package I'm working on, the very first
> example fails, even though the same code works when used in a regular
> session.  In my experience, this usually indicates T or F has been
> used instead of TRUE or FALSE, but that's not the case this time.
> 
> The error message is
> 
>  > x <- eulerzyx(1,0,0)4bb
>  Error: Trying to get slot "validity" from an object of a basic class
> ("NULL") with no slots
>  Execution halted
> 
> What I think is the relevant source looks like this:
> 
> setClass('orientation')
> setIs('orientation','vector')
> 
> setClass('eulerzyx', representation(x = 'matrix'))
> setIs('eulerzyx', 'orientation')
> 
> eulerzyx <- function(psi, theta, phi)
>     new('eulerzyx', x = cbind(psi, theta, phi))
> 
> Can anyone tell me what that error message means? 

The code has a NULL object that was supposed to be a class definition
(and therefore to have a "validity" slot).
 

> Is it something
> I've done wrong, or a problem with the methods package or the checks?

I was able to add your source & the one-line example to a small package
and get through R CMD check.

Can you do example(eulerzyx) after attaching the package?

Are you using a saved image (e.g., with an empty install.R file in the
package directory)?  (Though if not, the check would often fail at an
earlier stage.)

It would be nice to be able to get a dump from the R CMD check
evaluation--maybe someone can suggest how.

John
> 
> Duncan Murdoch
> 
> ______________________________________________
> [EMAIL PROTECTED] mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

-- 
John M. Chambers                  [EMAIL PROTECTED]
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web: http://www.cs.bell-labs.com/~jmc

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel

Reply via email to