Learn R Programming

icd9 (version 0.5)

icd9ExpandRangeMajor: create range of icd9 major parts

Description

accepts V, E or numeric codes. Does not validate codes beyond ensuring that the start and end of the range are of the same type. Will add leading zeroes when appropriate. User can strip them out with icd9DropLeadingZeroes if they wish.

Usage

icd9ExpandRangeMajor(start, end, invalidAction = icd9InvalidActions)

start %i9mj% end

Arguments

start,end
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 with range inclusive of start and end

See Also

Other ICD-9 ranges: %i9d%, icd9ExpandRangeDecimal; %i9s%, icd9ExpandRangeShort; icd9ChildrenDecimal; icd9Children, icd9ChildrenShort; icd9CondenseToExplain; icd9CondenseToMajor; icd9ExpandMinor, icd9ExpandMinorE, icd9ExpandMinorNV; icd9PrecedingMinors, icd9SubsequentMinors