-2

I have one datafame (X) with:

Columns Names: City,UF, Longitude,Latitude

And the second (Y) with:

Columns Names: Longitude, Latitude

I need to get the City and UF for each "Longitude, Latitude" in Y dataframe.

Thank you!

MrFlick
  • 195,160
  • 17
  • 277
  • 295
DemetriusRPaula
  • 377
  • 1
  • 10

1 Answers1

1

As long as your column names match, you can do a simple merge to join the values of Y with X.

merge(X,Y)

That will pull all the values of X that have a matching latitude and longitude in Y.

MrFlick
  • 195,160
  • 17
  • 277
  • 295