Learn R Programming

icd9 (version 0.5)

icd9InReferenceCode: match ICD9 codes

Description

Finds children of ricd9Reference and looks for icd9 in the resulting vector. It is a glorified

Usage

icd9InReferenceCode(icd9, icd9Reference, isShort = TRUE,
  isShortReference = TRUE, invalidAction = icd9InvalidActions,
  invalidActionReference = icd9InvalidActions)

icd9 %i9in% icd9Reference

Arguments

"icd9,icd9Reference"
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"
isShort
single logical value which determines whether the ICD-9 code provided is in short (TRUE) or decimal (FALSE) form.
isShortReference
logical, see argument isShort
"invalidAction,invalidActionReference"
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

  • logical vector of which icd9 match or are subcategory of icd9Referenec

Examples

Run this code
"1024" %i9in% "102"
"1024" %i9in% c("102","1025")
c("102", "1024","1025") %i9in% "102"
c("102", "1024","1025") %i9in% c("1024", "1025")
c("102", "1024","1025") %i9in% c("102", "1024", "1025")

Run the code above in your browser using DataLab