Description Usage Arguments Value See Also
A function used internally in extract_from_prescription
to
parse the dosage units, such as millilitres, tablets, grams and so on.
If there are multiple units mentioned in a string, only the first is returned.
1 | extract_dose_unit(txt)
|
txt |
a character vector |
A character vector the same length as txt
, containing
standardised units, or NA
if no units were found in the prescription.
A simple wrapper around str_replace_all
and
str_extract
.
Based on add_dose_unit.py
from original Python/Java algorithm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.