insert_param_unit_labs: Insert parameter and unit labels in different markup languges

Description Usage Arguments Details Value Examples

Description

Given a user defined 'short-hand' code for a parameter, unit of parameter-unit combination this functions returns a label in the selected markup language.

Usage

1
2
3
4
5
uls(sh, output = "md", definitions = NULL)

ulu(sh, output = "md", definitions = NULL)

ul(sh, output = "md", definitions = NULL)

Arguments

sh

User defined 'short-hand' code for a parameter, unit or 'parameter.unit' combination

output

The desired markup languages to be returned

definitions

A file path to a csv file containing definitions and markup conversions

Details

User defined 'short-hand' code for a parameters and units and their conversions into different markup languages are stored in a data file data/definitions.csv. Edit this file to add or adjust definitions. Short hand code can take any form, but may not contain R's reserved words (http://cran.r-project.org/doc/manuals/r-release/R-lang.html#Reserved-words). Parameter-unit combinations should be delimitated by a '.'

Value

A character string in the desired markup representing the requested label

uls returns the quantity symbol

ulu returns the quantity units in the specified markup

ul returns the combined quantity-units in the specified markup

Examples

1
2
3
4
5
6
uls(sh="T", output="R")
uls(sh="T", output="md")
ulu("degC", output="R")
ulu("degC", output="md")
ul("T.degC", output="R")
ul("T.degC", output="md")

edwardpmorris/unitlabels documentation built on May 15, 2019, 11:03 p.m.