Hi everyone,
I want to perform an inner-join on two sets of data that have no unique identifier, but do have unique latitude and longitudes (separate columns).
Can anyone suggest a method for joining two tables based on two columns?
Sincerely,
Schyler Brown
Here's the base R way:
merge(table1, table2, by.x=c("lat","long"), by.y=c("lat","long"))
And here's the dplyr way:
table1>%>
inner_join(table2, by=c("lat"="lat", "long"="long"))
These both assume that latitude and longitude are perfect matches.
It's really that simple huh? Thank you so much dephilli!!!!