For example I have a dataset that looks like this
ID|latitude|longitude|lat |lon
1 40.82696 -73.86721 49.82679 -73.86712
2 40.82696 -73.86721 49.82679 -73.86712
3 40.81844 -7386649 40.81146 -73.92172
I would like to find a package say sf or any other spatial that takes latitude and longitude pair and find the difference between lat and lon pair with specified units which would allow me to create a miles or feet output.