Hello everyone,
I was a bit surprised to see that there is no dedicated as.character method for the units class. The default drops units altogether. I'd have expect something similar to the output that format.units provides.
For example, I was expecting
x <- set_units(1,m)
as.character(x)
to return "1 m" or "1 [m]" and not "1".
An additional advantage for an as.character method would be that sprintf would support units as well.