prettify_compound_name: Make a compound name prettier and more human readable

View source: R/prettify_compound_name.R

prettify_compound_nameR Documentation

Make a compound name prettier and more human readable

Description

Make a compound name prettier and more human readable

Usage

prettify_compound_name(compound_name, case = "lower", force = FALSE)

Arguments

compound_name

a compound name or vector of names to be prettified such as "Sim-Midazolam" or "Sim-Ketoconazole-400 mg QD", which will become "midazolam" and "ketoconazole".

case

set the case to be "lower" (default), "title" (only the first letter in each word is capitalized), or "original" (nothing about the case changes). If you set the case to "lower" or "title", compounds with "OH-", "O-", "S-", or "R-" as a prefix will still have that capitalized, and if anyone has any other common exceptions they'd like, email Laura Shireman.

force

TRUE or FALSE (default) for whether to force cleanup of compound names regardless of whether the compound looks like it was a Simcyp Simulator compound. Leaving this as FALSE means that, e.g., "Sim-Ketoconazole-400 mg QD" will become "ketoconazole", but if your client has a drug named ABC123 – so it doesn't look like a Simcyp Simulator compound – it will be left alone.

Value

a vector of prettier compound names

Examples


prettify_compound_name(c("Sim-Midazolam",
                         "Sim-Ketoconazole-400 mg QD",
                         "none"))


shirewoman2/Consultancy documentation built on Feb. 18, 2025, 10 p.m.