Hi,
  I have very carefully developed several S4 classes that describe 
censored water-quality data. I have routines for them that will support 
their use in data.frames and so forth. I have run into a problem when I 
try to use the S4 class as the response variable in a formula and try to 
extract the model frame. I get an error like:

Error in model.frame.default(as.lcens(Y) ~ X) : object is not a matrix

  In this case, as.lcens works much like the Surv function in the survival 
package except that the object is an S4 class and not a matrix of class 
Surv. I would have expected that the model.frame function would have been 
able to manipulate any kind of object that can be subsetted and put into a 
data.frame. But that appears not to be the case. I'm using R 2.14.1 if 
that matters.
  I can supply the routines for the lcens data if needed.
  Am I looking at needing to write a wrapper to convert all of my S4 
classes into matrices and then extract the necessary data in the matrices 
according to rules for the particular kind of S4 class? Or, am I missing a 
key piece on how model.frame works?
  Thanks.
Dave

	[[alternative HTML version deleted]]

