View source: R/prettify_compound_name.R
prettify_compound_name | R Documentation |
Make a compound name prettier and more human readable
prettify_compound_name(compound_name, case = "lower", force = FALSE)
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. |
a vector of prettier compound names
prettify_compound_name(c("Sim-Midazolam",
"Sim-Ketoconazole-400 mg QD",
"none"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.