[R] Big data and column correspondence problem

murilofm murilofmoraes at gmail.com
Tue Jul 26 15:44:37 CEST 2011


Daniel, thanks for the answer.
I will try to make myself i little bit clearer. Doing step by step I would
have (using a loop trough the lines of 'A'):

1. AA[1] is 4. As so, I would have to compare A1[1] = 20 and A2[1] =3 with

           B1 B2 B3
B[3,2:4] 7 11 NA

beacause BB[3]=4. Since there is no match, this would retrieve me a zero.
The same would happen with AA[2]. For AA[3] I have 

     AA A1 A2
[3,]  4 11  7

Since  both A1[3] = 20 and A2[3] =3 match with B[3,2:4] this would retrieve
me 1.

2. For AA[4:5] i would have to compare each line with B[1:2,2:4]. That is,
for AA[4]=2 i have a match with BB[1] and BB[2]. Then I have to compare

      A1 A2
[4,]  5  5

with 

           B1 B2 B3
B[1,2:4] 5  3  12

and

            B1 B2 B3
B[2,2:4] 11 12 13

Again, for A1[4] and A2[4] and would have no match. But A1[5] and A1[5]
match with B2[1] and B1[1].

3. And so on for the other lines of A.

The problem is that if I perform that as a loop it really takes to long.
Hope i could make it clearer.

--
View this message in context: http://r.789695.n4.nabble.com/Big-data-and-column-correspondence-problem-tp3694912p3695795.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list