Say I have a large set of data in R that has variables latitude, longitude, magnitude, and depth (for earthquakes) and I want to create a new data set that includes data for all the variables but only between certain values of latitude and longitude. For example, I want earthquakes that are between 0 and 50 longitude and -20 and 45 latitude (but I want the magnitude and depth to still correspond to the correct longitude and latitudes). Is there an easy way to do this R? For example: Say I have a large set of data in R that has va