mhudecheck / revgeo

Reverse Geocoding in R with Google Maps API and Photon API
GNU General Public License v3.0
23 stars 7 forks source link

Successfully getting 31 results and then getting error: Error in returned_data$results[[1]] : subscript out of bounds #16

Closed Cbezz closed 3 years ago

Cbezz commented 3 years ago

Hey everyone,

The package is great and so easy to use. My only issue is that I get this error: Error in returned_data$results[[1]] : subscript out of bounds after I got the first 31 results. I also ran it on a different dataset and managed to get 48 results before encountering the same error. This is my code:

ReverseGeoMain <- revgeo(df$Longitude, df$Latitude, provider ="google", 
                          API = apikey, output = "frame",item="frame")

Any help would be much appreciated.

I should also mention that I used photon instead of google and I did not get any errors, however it could not find the address or even the country, but it's interesting that it worked without the same error.

Also the latitude and longitude coordinates I've been provided with only have 2 decimal places, so I'm wondering if that's affecting things. That might've been why photon couldn't find anything but could it be why google only works for some?

Thanks so much for your time

mhudecheck commented 3 years ago

You'll have to reinstall the library from the Github repository. There was a change in one of the APIs last year, and I haven't updated the version in CRAN yet.