The guess is indeed a guess and can be wrong. There are some codes which could be either ICD-9 or ICD-10. The current implementation doesn't check whether the codes exist in any definitions (ICD-9 CM or WHO, for example), just whether they are valid.
guess_version(x, short_code, ...)
input data
single logical value which determines whether the ICD-9
code provided is in short (TRUE
) or decimal (FALSE
) form.
Where reasonable, this is guessed from the input data.
number of elements or rows to sample
Currently, ambiguous codes are guessed as being ICD-9 or ICD-10, with no indication of uncertainty. Possible solutions are adding an attribute, warning, or optionally throwing an error.