Learn R Programming

icd9 (version 0.2.1)

icd9DropZeroFromDecimal: drop zero padding from decimal ICD-9 code.

Description

decimal form ICD-9 codes are not ambiguous if the leading zeroes are dropped. Some short-form ICD-9 codes would not be ambiguous, e.g. "1" but many would be problematic, so no function is provided to do this for short-form codes.

Usage

icd9DropZeroFromDecimal(icd9Decimal, invalidAction = c("ignore", "silent",
  "warn", "stop"))

Arguments

icd9
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"
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

Value

  • character vector of ICD-9 codes with extra zeroes dropped from major part

See Also

Other ICD-9 convert: icd9AddLeadingZeroesMajor; icd9AddLeadingZeroesShort; icd9DecimalToShort; icd9PartsRecompose, icd9PartsToDecimal, icd9PartsToDecimal, icd9PartsToShort, icd9PartsToShort