rOpenGov / sweidnumbr

R package for Structural handling of identity numbers used in the swedish administration such as personal identity numbers (personnummer) and organizational identity numbers (organisationsnummer).
https://ropengov.github.io/sweidnumbr/
Other
8 stars 3 forks source link

Wrong result of oin_ctrl() if input lenght is wrong #95

Closed janzzon closed 8 years ago

janzzon commented 8 years ago

Invalid lenght of input to oin_ctrl() returns wrong result or throws an error

oin_ctrl("556000-46155")    # Should return  NA
#> [1] TRUE
oin_ctrl("556000-461", force_logical = TRUE)
#> Error in FUN(X[[i]], ...): Number of digits in 'id', does not match the length of 'multiplier'!
MansMeg commented 8 years ago

Fixed with e973c7b054db0823c14543d9c38bb13f9fd76cfc