Learn R Programming

icd9 (version 0.2.1)

icd9ShortToDecimal: icd9ShortToDecimal

Description

converts ICD-9 'short' form to decimal form

Usage

icd9ShortToDecimal(icd9Short, leadingZeroes = FALSE,
  keepLoneDecimal = FALSE, invalidAction = c("ignore", "silent", "warn",
  "stop"))

Arguments

icd9Short
is a character vector of ICD-9 codes. If fewer than five characters is given in a code, then the digits are greedily assigned to hundreds, then tens, then units, before the decimal parts. E.g. "10" becomes "010", not "0010"
leadingZeroes
logical whether to fill out major part with zeroes, or just truncate to the left. If E code, there is no valid code since E800-E999 is defined. V codes could be V0x or Vxx, and so could be zero padded.
keepLoneDecimal
logical. Since the presence or absence of a trailing zero in an ICD-9 code can make a difference, when converting to decimal, we have a situation where we do not want to add trailing zeroes, but may wish to preserve the decimal point. If this is desired,
invalidAction
character string (unit length) containing one of: "ignore", "silent", "warn", "stop"

- ignore no check for validity of ICD-9 code is made implicitly. This is the fastest option. If the function call is explicitly to check validity, e