Formatting fraction, count and denominator values
Usage
jjcsformat_fraction_count_denom(x, d = 1, roundmethod = c("sas", "iec"), ...)Arguments
- x
numeric
with elementsnumandfractionornum,denomandfraction.- d
numeric(1). Number of digits to round fraction to (default=1)
- roundmethod
(
string)
choice of rounding methods. Options are:sas: the underlying rounding method istidytlg::roundSAS, where
roundSAS comes from this Stack Overflow post https://stackoverflow.com/questions/12688717/round-up-from-5iec: the underlying rounding method isround
- ...
Additional arguments passed to other methods.
Value
x formatted as a string with d digits of precision,
with special cased values as described in Details above.
