Learn R Programming

icd (version 3.3)

icd9_extract_alpha_numeric: extract alphabetic, and numeric part of ICD-9 code prefix

Description

removes white space and separates V or E if present.

Usage

icd9_extract_alpha_numeric(x)

Arguments

icd9

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

vector or matrix, with first item of each row (or whole vector) containing V, E or "". The second part contains the numeric parts of the code, which may include a decimal point.