Closed hughjonesd closed 1 year ago
I wonder if you'd consider a sprintf.units method, analogous to format.units. At the moment, it works but the unit is dropped:
sprintf.units
format.units
x <- set_units(1:3, "m/s") x > sprintf("%.3f", x) [1] "1.000" "2.000" "3.000"
Is that possible? I don't think this is S3 generic.
Ah. In that case, never mind - my mistake.
I wonder if you'd consider a
sprintf.units
method, analogous toformat.units
. At the moment, it works but the unit is dropped: