joelgombin / banR

R client for the BAN API
http://joelgombin.github.io/banR/
GNU General Public License v3.0
28 stars 10 forks source link

bug when the adresses are duplicated #3

Closed joelgombin closed 8 years ago

joelgombin commented 8 years ago

Because of the join with implicit keys, when there are duplicated adresses in the input dataframe, the output dataframe has too many rows. Here is a reprex:

df <- data.frame(adresses = c("11 allée Sacoman", "11 allée Sacoman", "23 allée Sacoman"), code_insee = "13016", stringsAsFactors = FALSE)
result <- banR::ban_geocode(df, adresses, code_insee = "code_insee")
#> Geocoding...
nrow(df)
#> [1] 3
nrow(result)
#> [1] 5