Learn R Programming

icd (version 4.0.6)

guess_version: Guess version of ICD codes

Description

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.

Usage

guess_version(x, short_code, ...)

Arguments

x

input data

short_code

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.

n

number of elements or rows to sample

Details

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.