make_pan_percdrainage_cols | R Documentation |
Create percutaneous drainage columns for long conversion
make_pan_percdrainage_cols(df)
df |
a data table to add the columns to |
First checks if the data table contains a "pan_percdrainage" column. If so, the column is split into 4 columns according to the regex pattern ",\s?".
x <- data.table::data.table(
pan_percdrainage = c("Yes-other", "Yes-bile", "Yes-pus", "Yes-amylase-rich fluid",
"Yes-amylase-rich fluid,Yes-pus", "Yes-bile,Yes-other", "Yes-amylase-rich fluid,Yes-pus,Yes-other",
"Yes-amylase-rich fluid,Yes-bile,Yes-other", "Yes-pus,Yes-bile", "Yes-pus,Yes-other",
"Yes-amylase-rich fluid,Yes-pus,Yes-bile", "Yes-amylase-rich fluid,Yes-other",
"Yes-amylase-rich fluid,Yes-pus,Yes-bile,Yes-other", "Yes-amylase-rich fluid,Yes-bile",
"Yes-pus,Yes-bile,Yes-other")
)
nsqipr:::make_pan_percdrainage_cols(x)
x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.