View source: R/utilities-qualification.R
extractNameAndUnit | R Documentation |
Returns a named list with two entries (name, unit) corresponding to the name and unit
extracted out of the text
provided as parameter
extractNameAndUnit(text)
text |
Character from which name and unit are extracted |
A named list, with fields name
and unit
.
## Not run:
res <- extractNameAndUnit("Value [mg]")
res$name
# > "Value"
res$unit
# > "mg"
res <- extractNameAndUnit("Value")
res$name
# > "Value"
res$unit
# > ""
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.