Re: [R] code optimization problem ... using or not using "which"function

2009-05-29 Thread krzysztof . sakrejda
Why not use the 'merge' function? Krzysztof Sent via BlackBerry by AT&T -Original Message- From: jim holtman Date: Fri, 29 May 2009 20:55:12 To: Juan Carlos Laguardia Cc: Subject: Re: [R] code optimization problem ... using or not using "which" functi

Re: [R] code optimization problem ... using or not using "which" function

2009-05-29 Thread jim holtman
For a start, do all your conversions to character and Date once outside the loop so you are not doing them for each iteration. Not exactly sure what you are doing, but it looks like with the 'and's you are only checking for the rows that are the same. You might want to use a 'match' function like