On 22 Jul 2005, at 11:20, Adaikalavan Ramasamy wrote:
> Does either 'zippo' or 'zappo' contain the values 1 or 2 ? > > > If so, then you cannot vectorize this code because you are changing > the > values in 'new' at every iteration and potentially sampling a value > from > new[ ,1] or new[ ,2] . > That's exactly my situation, and is exactly what I want to do. After taking out the typo (and bug) "drow[i]>0" the code seems to work fast enough... I'll tinker a bit with it, but it could be good enough as it is. Cheers, Federico Calboli -- Federico C. F. Calboli Department of Epidemiology and Public Health Imperial College, St. Mary's Campus Norfolk Place, London W2 1PG Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 f.calboli [.a.t] imperial.ac.uk f.calboli [.a.t] gmail.com ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html