Displaying 1 result from an estimated 1 matches for "logical_result".
2008 Jan 13
4
For Loop performance
Hello,
Newbie question and hope you can help .
I have two vector V1 and V2, where length(V2) = length of (V1) * 2;
length(V1) ~ 16,000.
For each member in V1, I need to compare 2 element of V2 for equality
i.e.
for (I in 1:length (V1)) {
if ( v2[i] == v1[i] & v2[i+1]==v1[i] ){
statement_1
statement_2
.
}
}
This for-loop is too slow