[Rd] Problem with Rcmd check and S4 methods

Duncan Murdoch dmurdoch at pair.com
Fri Jun 13 13:25:06 MEST 2003


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)
 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?  Is it something
I've done wrong, or a problem with the methods package or the checks?

Duncan Murdoch



More information about the R-devel mailing list