trim_trailing_whitespace: Trim trailing whitespace on 3-char ICD-9 codes

View source: R/trim_trailing_whitespace.R

trim_trailing_whitespaceR Documentation

Trim trailing whitespace on 3-char ICD-9 codes

Description

Some of the ICD-9 codes only contain 3 characters (i.e., they do not contain subcodes) but have a space at the end. This function just takes the record column and strips out the trailing space.

Usage

trim_trailing_whitespace(icd9_record)

Arguments

icd9_record

One of the record columns from an ICD-9 dataframe

Value

vector

Examples

trim_trailing_whitespace(c("400 ", "402", "4032"))

mkiang/narcan documentation built on Sept. 26, 2024, 7:18 a.m.