Skip to content
Prev 261855 / 398502 Next

VLOOKUP in R - tried everything.

On Jun 3, 2011, at 12:43 PM, peter dalgaard wrote:

            
If I remember correctly VLOOKUP (and HLOOKUP)  require sorted  
cutpoints and picks the lowest number that the vector element exceeds  
or equals. If so, then I suspect that an indexing strategy with  
findInterval should work correctly if the dataframe is sorted with  
order(). If you post a cut-pasteable example with desited input and  
output, I sure someone can rig something up.