Hi,
Yes indeed. Thanks.
Yours
Eric Lecoutre wrote:
Hi,
For your lm problem, you could begin to create a virtual class that accepts either NULL or a lm object:
> setClassUnion("mylm", c("NULL","lm")) > setClass("foo", representation(x="numeric", y="mylm")) > new("foo",x=1,y=NULL)
Then, you have to check the content of slot y in any function that will manipulate objects of class "foo":
setMethod("show","foo",function(object) { cat("\n object of class foo") if (!is.null([EMAIL PROTECTED])) cat(" does have a lm object in slot y!") })
Eric
--
Dipl. bio-chem. Witold Eryk Wolski MPI-Moleculare Genetic
Ihnestrasse 63-73 14195 Berlin _
tel: 0049-30-83875219 'v'
http://www.molgen.mpg.de/~wolski / \
mail: [EMAIL PROTECTED] ---W-W----
[EMAIL PROTECTED]
______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel