From dmurdoch at pair.com  Fri Jun 13 13:25:06 2003
From: dmurdoch at pair.com (Duncan Murdoch)
Date: Fri Jun 13 18:25:15 2003
Subject: [Rd] Problem with Rcmd check and S4 methods
Message-ID: <72ujevgnr0vt1hop4kbb1v9tfqd3e36a98@4ax.com>

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


[Rd] Problem with Rcmd check and S4 methods
Duncan Murdoch