I'm currently desperate for a filtering in R. I have searched the forum for a long time, but have not found a corresponding question.
I have the following record:
"Latitude","Longitude","Land","Stadt"
37.7749295,-122.4194155,"US","San Francisco"
48.8529682,2.3499021,"FR","Paris"
28.6139391,77.2090212,"IN","Paharganj"
48.801408,2.130122,"FR","Versailles"
26.9124336,75.7872709,"IN","Jaipur"
43.296482,5.36978,"FR","Marseille"
26.0173274,76.5025742,"IN","Khilchipur"
37.8651011,-119.5383294,"US","White Wolf"
45.4396385,10.6865449,"IT","Peschiera del Garda"
12.5683747,99.9576888,"TH","Hua Hin"
27.1766701,78.0080745,"IN","Agra"
Now I want to consider only the data from India (IN). But the filtering has to be done via longitude and latitude and not via country. This means that I need all data within the following coordinates:
Latitude > 26 and < 29 AND Longitude > 75 and < 79
Accordingly, the following data rows should come as the result:
"Latitude","Longitude","Land","Stadt"
28.6139391,77.2090212,"IN","Paharganj"
26.9124336,75.7872709,"IN","Jaipur"
26.0173274,76.5025742,"IN","Khilchipur"
27.1766701,78.0080745,"IN","Agra"
What would be the right way to do this double filtering via Longitude and Latitude?
I would be very grateful for any help.
Best regards, Jeem