Closed aspeddro closed 1 year ago
Hi @aspeddro . Thank you for your contribution and pleace accept my apologies for taking so much time to get back to you. The code of the function looks much nicer now. However, the new function does not pass the tests in test-cep_to_state.R
.
The function should be able to throw an informative error message in these situations below:
cep_to_state(cep = 'aaaa')
cep_to_state()
I've added a few checks that were missing. Thanks!
This PR refactor
cep_to_state
function.ifelse
, uses a structure that is easier to maintainifelse
and&
)cep_to_state("7900000000000000")
raise a error. Currently return"MS"