icd9InReferenceCode: match ICD9 codes

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Finds children of icd9Reference and looks for icd9 in the resulting vector.

Usage

1
2
3
icd9InReferenceCode(icd9, icd9Reference, isShort, isShortReference = TRUE)

icd9 %i9in% icd9Reference

Arguments

isShort

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.

isShortReference

logical, see argument isShort

"icd9, icd9Reference"

is a character vector or factor 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".

Value

logical vector

Examples

1
2
3
4
5
6
#%i9in% assumes both test code(s) and reference set of codes are \emph{short}
"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")

icd9 documentation built on May 30, 2017, 2:25 a.m.