Skip to contents

This is a crude function to make a printable representation of a unit data.frame, with very explicit parentheses and exponents.

Usage

unit_as_character(unit)

Arguments

unit

a data.frame created by unit.from.string()

Value

a string representation of that data.frame purely for printing

Examples

u <- unit.from.string("s^-1")
str <- unit_as_character(u)
print(str)
#> [1] "(second*10^(0))^(-1)"