[R] Extracting Parts of Array (Index Comparison?)

teriri teriri at gmail.com
Fri Aug 19 00:27:13 CEST 2011


Hi all,

I have the following issue:

head(A):
          C6      
5   6.095243  
6  12.622674 
7   6.418493  
8  11.726602 
9   9.282112  
25  9.625917  

head(B):
   V1      
2  30437  
5  1102503
6  1102539 
7  1103257 
8  1103295 
9  1104434 
25 1100494

I would like to extract elements from B such that their left-most numbers
will match those of A (5, 6, 7, 8, 9, 25). However, I am not sure how to do
this, since these numbers don't correspond to the indices of these arrays.
For instance, Column 0 of B is 30437....1100494. Basically, I am not sure
how to extract those numbers that show up to the left. Any help would be
much appreciated! And sorry if my lack of programming jargon is confusing.
Thanks in advance!


--
View this message in context: http://r.789695.n4.nabble.com/Extracting-Parts-of-Array-Index-Comparison-tp3753792p3753792.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list