ropensci / PostcodesioR

API wrapper around postcodes.io - free UK postcode lookup and geocoder
https://docs.ropensci.org/PostcodesioR
39 stars 7 forks source link

Update postcode_lookup.R #7

Closed AndreasSoteriades closed 4 years ago

AndreasSoteriades commented 4 years ago

postcode_lookup("DA2 7HT") Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 1, 0

That’s because list element $nuts is NULL, which throws an error when converting to a data frame. Proposed change fixes the problem.

erykwalczak commented 4 years ago

@AndreasSoteriades Thanks for the PR

AndreasSoteriades commented 4 years ago

@erzk You're welcome- glad I helped.