conv_age: Convert age to integer

conv_ageR Documentation

Convert age to integer

Description

Convert age to integer

Usage

conv_age(vec)

Arguments

vec

a character vector of values to convert

Details

NSQIP encodes anyone over the age of 90 as "90+". This converts all "90+" to 90. If given NA, will return NA.

Value

an integer vector

Examples

nsqipr:::conv_age(c("18","45","90+",NA))


dylanrussellmd/nsqipr documentation built on Oct. 13, 2023, 11:01 a.m.