In my case I have two data.frames:
> head(Trecho)
Xt Yt Zt
1 -75.56468 1.642710 0
2 -74.56469 1.639634 0
3 -73.56469 1.636557 0
4 -72.56470 1.633480 0
5 -71.56470 1.630403 0
6 -70.56471 1.627326 0
> head(TrechoSim)
Xs Ys Zs
1 -71.7856 -0.509196 0
2 -71.7856 -0.509196 0
3 -71.7856 -0.509196 0
4 -71.7856 -0.509196 0
5 -71.7856 -0.509196 0
6 -71.7856 -0.509196 0
The data frame Trecho
has approximately 5,000 rows and TrechoSim
has 20,000 rows. Similar to PROCV
of Excel, I need to fetch the closest value where Xt = Xs (in excel I use TRUE, and returns the first closest value of Xt). There is no tolerance for this closeness. I need all values of the data frame Trecho
with their respective value closest to TrechoSim
.
I've tried difference_inner_join
but it returns NA
values on some lines.
Thank you,