I have a dataset with emails like:
my_df <- data.frame(email = c("[email protected]", "[email protected]", "[email protected]"))
And I have an open source dataset like:
open_data <- data.frame(name = c("mirko", "elsa", "pina"), gender = c("male", "female", "male")
- How can I perform a lookup of my_df with open_data to associate the gender to each email?
- In the case of multiple join, I want it to create multiple records
The result should be:
result <- data.frame(email = c("[email protected]", "[email protected]", "[email protected]", "[email protected]"), gender = c("male", "female", "female", "male))