Re: [R] recovering from errors with lapply()

2013-02-13 Thread Milan Bouchet-Valat
Le mardi 12 février 2013 à 15:41 -0600, Andrew Barr a écrit : Hi all, I am searching for a way to recover results from lapply() when one or more values returns an error. I have a written a function that uses tryCatch() to recover from errors. Here is a very simple example of such a

Re: [R] recovering from errors with lapply()

2013-02-13 Thread Andrew Barr
Thanks very much Milan. Your answer makes perfect sense. Best, Andrew On Wed, Feb 13, 2013 at 3:51 AM, Milan Bouchet-Valat nalimi...@club.frwrote: Le mardi 12 février 2013 à 15:41 -0600, Andrew Barr a écrit : Hi all, I am searching for a way to recover results from lapply() when one

[R] recovering from errors with lapply()

2013-02-12 Thread Andrew Barr
Hi all, I am searching for a way to recover results from lapply() when one or more values returns an error. I have a written a function that uses tryCatch() to recover from errors. Here is a very simple example of such a function. divideBy2-function(X){ result-tryCatch(X/2, error =