RE: [R] error-handling question

About this list Date view Thread view Subject view Author view Attachment view

From: Andrew C. Ward (andreww@cheque.uq.edu.au)
Date: Tue 25 Feb 2003 - 07:04:45 EST


Message-id: <01C2DC3F.FA5574B0.andreww@cheque.uq.edu.au>

You can achieve this with try(). Look at the second example (?try),
which is probably most like what you want to do.
        

Regards,

Andrew C. Ward

CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
andreww@cheque.uq.edu.au

On Monday, February 24, 2003 7:51 PM, ximing wu [SMTP:ximing@are.berkeley.edu] wrote:
> hi,
> I have a question about error-handling. Say I want to do a simulation 100
> times, each experiment involves inverting a matrix. Occasionally the matrix
> is close to singularity, R gives an error message and the program stops
> right there. Is there any way I can prevent the error message, assign
> something (say a NULL) to the outcome, and move on?
>
> thanks a lot.
>
>
> -----------------------------------------
> Ximing Wu
> Department of Agricultural & Resource Economics
> University of California, Berkeley
> http://are.berkeley.edu/~ximing/
> ------------------------------------------
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________
R-help@stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:23 EST