reverse_geo
throws an error if I supply the same pair of coordinates multiple times and the input has only one unique pair of coordinates.
If I supply the same pair of coordinates multiple times, but this is not the only unique pair, reverse geocoding works fine. Here's a minimal example:
suppressPackageStartupMessages(library(dplyr)) library(tidygeocoder) df <- tibble(lat = 0, long = 0) df |> reverse_geocode(lat = lat, long = long) #> # A tibble: 1 × 3 #> lat long address #> <dbl> <dbl> <chr> #> 1 0 0 Soul Buoy df[rep(1, 5), ] |> reverse_geocode(lat = lat, long = long) #> Error in vapply(elements, encode, character(1)): values must be length 1, #> but FUN(X[[2]]) result is length 5 df[rep(1, 5), ] |> add_row(lat = 10, long = 10) |> reverse_geocode(lat = lat, long = long) #> # A tibble: 6 × 3 #> lat long address #> <dbl> <dbl> <chr> #> 1 0 0 Soul Buoy #> 2 0 0 Soul Buoy #> 3 0 0 Soul Buoy #> 4 0 0 Soul Buoy #> 5 0 0 Soul Buoy #> 6 10 10 Mun-Munsal, Bauchi, Nigeria
Created on 2021-08-21 by the reprex package (v2.0.1)
(geo
, however, works fine if the same location string is supplied multiple times.)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4