Re: [R] Continuing on with a loop when there's a failure

2010-07-19 Thread Josh B
y3 [1,] 0.6976063 NA 0.6976063 From: David Winsemius dwinsem...@comcast.net Cc: R Help r-help@r-project.org Sent: Sun, July 18, 2010 9:12:44 PM Subject: Re: [R] Continuing on with a loop when there's a failure On Jul 18, 2010, at 12:28 PM, Josh B wrote

Re: [R] Continuing on with a loop when there's a failure

2010-07-18 Thread Josh B
]] From: Peter Konings peter.l.e.koni...@gmail.com Sent: Tue, July 13, 2010 5:45:17 PM Subject: Re: [R] Continuing on with a loop when there's a failure Hi Josh, Test the class of the resulting object. If it is 'try-error' fill your result with NA or do some other error handling. result - try

Re: [R] Continuing on with a loop when there's a failure

2010-07-18 Thread Josh B
Konings peter.l.e.koni...@gmail.com Sent: Tue, July 13, 2010 5:45:17 PM Subject: Re: [R] Continuing on with a loop when there's a failure Hi Josh, Test the class of the resulting object. If it is 'try-error' fill your result with NA or do some other error handling. result - try(somemodel) if(class

Re: [R] Continuing on with a loop when there's a failure

2010-07-18 Thread David Winsemius
The results matrix is empty! From: Peter Konings peter.l.e.koni...@gmail.com Sent: Tue, July 13, 2010 5:45:17 PM Subject: Re: [R] Continuing on with a loop when there's a failure Hi Josh, Test the class of the resulting object. If it is 'try-error' fill your result

Re: [R] Continuing on with a loop when there's a failure

2010-07-18 Thread David Winsemius
y1 y2 y3 [1,] NA NA NA The results matrix is empty! From: Peter Konings peter.l.e.koni...@gmail.com Sent: Tue, July 13, 2010 5:45:17 PM Subject: Re: [R] Continuing on with a loop when there's a failure Hi Josh, Test the class of the resulting object

Re: [R] Continuing on with a loop when there's a failure

2010-07-18 Thread Josh B
...@comcast.net Cc: Peter Konings peter.l.e.koni...@gmail.com; R Help r-help@r-project.org Sent: Sun, July 18, 2010 3:33:07 PM Subject: Re: [R] Continuing on with a loop when there's a failure On Jul 18, 2010, at 4:25 AM, Josh B wrote: Hello Peter, I tried your suggestion, but I was still not able

Re: [R] Continuing on with a loop when there's a failure

2010-07-13 Thread David Winsemius
: David Winsemius dwinsem...@comcast.net To: Josh B josh...@yahoo.com Cc: R Help r-help@r-project.org Sent: Mon, July 12, 2010 8:09:03 PM Subject: Re: [R] Continuing on with a loop when there's a failure On Jul 12, 2010, at 6:18 PM, Josh B wrote: Hi R sages, Here is my latest problem. Consider

Re: [R] Continuing on with a loop when there's a failure

2010-07-13 Thread David Winsemius
] Continuing on with a loop when there's a failure On Jul 12, 2010, at 6:18 PM, Josh B wrote: Hi R sages, Here is my latest problem. Consider the following toy example: x - read.table(textConnection(y1 y2 y3 x1 x2 indv.1 bagels donuts bagels 4 6 indv.2 donuts donuts donuts 5 1 indv.3 donuts

Re: [R] Continuing on with a loop when there's a failure

2010-07-13 Thread Josh B
. From: David Winsemius dwinsem...@comcast.net Cc: R Help r-help@r-project.org Sent: Mon, July 12, 2010 8:09:03 PM Subject: Re: [R] Continuing on with a loop when there's a failure On Jul 12, 2010, at 6:18 PM, Josh B wrote: Hi R sages, Here is my latest problem

Re: [R] Continuing on with a loop when there's a failure

2010-07-13 Thread Josh B
:09:04 AM Subject: Re: [R] Continuing on with a loop when there's a failure On Jul 13, 2010, at 9:04 AM, David Winsemius wrote: On Jul 13, 2010, at 8:47 AM, Josh B wrote: Thanks again, David. [[elided Yahoo spam]] (BTW, it did work.) Here's what I'm trying now: for (i in 1:2

Re: [R] Continuing on with a loop when there's a failure

2010-07-13 Thread David Winsemius
-project.org Sent: Tue, July 13, 2010 9:09:04 AM Subject: Re: [R] Continuing on with a loop when there's a failure On Jul 13, 2010, at 9:04 AM, David Winsemius wrote: On Jul 13, 2010, at 8:47 AM, Josh B wrote: Thanks again, David. ...but, alas, I still can't get it work! (BTW, it did work.) Here's

Re: [R] Continuing on with a loop when there's a failure

2010-07-13 Thread David Winsemius
Cc: Josh B josh...@yahoo.com; R Help r-help@r-project.org Sent: Tue, July 13, 2010 9:09:04 AM Subject: Re: [R] Continuing on with a loop when there's a failure On Jul 13, 2010, at 9:04 AM, David Winsemius wrote: On Jul 13, 2010, at 8:47 AM, Josh B wrote: Thanks again, David. ...but, alas, I

Re: [R] Continuing on with a loop when there's a failure

2010-07-12 Thread David Winsemius
On Jul 12, 2010, at 6:18 PM, Josh B wrote: Hi R sages, Here is my latest problem. Consider the following toy example: x - read.table(textConnection(y1 y2 y3 x1 x2 indv.1 bagels donuts bagels 4 6 indv.2 donuts donuts donuts 5 1 indv.3 donuts donuts donuts 1 10 indv.4 donuts donuts donuts 10 9