conv_hep_liverfail_type: Parse a column for type of liver failure

conv_hep_liverfail_typeR Documentation

Parse a column for type of liver failure

Description

Parse a column for type of liver failure

Usage

conv_hep_liverfail_type(vec)

Arguments

vec

a character vector of values to convert

Details

NSQIP encodes the hep_liverfail column as either "meets criteria for PHLF" or "PHFL (receiving clotting factors to maintain INR)". This function extracts those values from character vectors and factors them.

Value

a factor vector

Examples

x <- c("No-does not meet criteria for PHLF",
"Yes-meets criteria for PHLF",
"Yes-PHLF (receiving clotting factors to maintain INR)",
NA)

nsqipr:::conv_hep_liverfail_type(x)


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