On 13-Oct-03 Martin Maechler wrote: > slightly more recommendable code is > > result <- try(myfun(...)) > if(inherits(result, "try-error")) next > > > - using inherits(obj, cls) is more robust than > class(obj) == cls because it also works when `obj' has more > than one class (e.g. a `glm' object) or when `obj' has no > class {i.e. when `methods' is not attached or in older R versions}.
Thanks! (I had been worried about exactly this kind of issue, though in fact it worked in the case I had.) > - no trailing ";" ... Old C (and awk) habits die hard ... Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <[EMAIL PROTECTED]> Fax-to-email: +44 (0)870 167 1972 Date: 13-Oct-03 Time: 10:50:16 ------------------------------ XFMail ------------------------------ ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help