vlookup COMMAND

hey, i'm looking for a commend like in excel calld "vlookup" to use in R. tnx

Hi @laura14

This blog post goes through a few methods

There is also the library vlookup which does it

Thanks

You should be aware that vlookup and merge do not function the same way. Vlookup will only return the first instance of a match while merge will return all possible matches. This is typically observed as an increase in overall rows of your data set.

Iā€™d recommend you try to learn some basic SQL function to better understand this. It will help you understand the limits of vlookup.

1 Like

library(dplyr) has inner, right, and left join which, may be more to your liking. Very handy package to have installed, well for me anyway. :slight_smile:

Quick look at joining using dplyr

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.