Re: [R] How to catch an error using try

2009-08-04 Thread ONKELINX, Thierry
Put your function in try() and the test it's class gene.seq <- try(getSequence (id=gene.map[,"ensembl_transcript_id"], type="ensembl_transcript_id", seqType="3utr", mart=hmart)) if(class(gene.seq) == "try-error"){ #code to run when an error occurs } else { #code to run when no er

Re: [R] How to catch an error using try

2009-08-03 Thread jim holtman
gotError <- try(gene.seq <- getSequence (id=gene.map[,"ensembl_transcript_id"], type="ensembl_transcript_id", seqType="3utr", mart=hmart)) if (inherits(gotError, 'try-error')){.error occurred, do recovery} On Mon, Aug 3, 2009 at 11:53 AM, wrote: > Sometimes the following function call

Re: [R] How to catch an error using try

2009-08-03 Thread Steve Lianoglou
Hi, On Aug 3, 2009, at 11:53 AM, wrote: Sometimes the following function call causes a database exception: gene.seq <- getSequence (id=gene.map[,"ensembl_transcript_id"], type="ensembl_transcript_id", + seqType="3utr", mart=hmart) I understand the above functi