Description Usage Arguments Value
When a small number is requested inline, it is often preferable to use an English expression rather than the numeral.
Further, referential purity can be lost when numbers are transformed to suit printing (say by multiplying by 100 to use 'per cent').
A complement to texNum
.
These functions are all of the form grattan_*
to avoid namespace clashes.
1 2 3 | Grattan_frac(number, hedges = c("Almost", "Over"))
grattan_frac(number, hedges = c("Almost", "Over"))
|
number |
A length-one numeric vector. |
hedges |
A length-2 character vector giving the words for a hedge (see https://en.wikipedia.org/wiki/Hedge_(linguistics)),
included not to mislead but to sound natural without being inaccurate.
If |
For Grattan_frac
and grattan_frac
, the nearest fraction as an English word, sentence-case or lower-case respectively.
If hedges
is supplied, a phrase including the next fraction above or below it as the phrase dictates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.