Re: [R] How do I vectorize this loop....

2009-10-21 Thread William Dunlap
Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of chipmaney > Sent: Wednesday, October 21, 2009 2:58 PM > To: r-help@r-project.org > Subject: [R]

[R] How do I vectorize this loop....

2009-10-21 Thread chipmaney
Basically I need to use the following data to calculate a squared error for each Sample based on the expected Survival for the zone. Basically, this code has Live/Dead for each sample, and I need to calculate the square error based on the Expected Mean (ie, Survival). The code looks up the expec