Closed mattfidler closed 4 years ago
It's a design choice. Now, for convenience, we have:
set_units(3, m) * 2
#> 6 [m]
which means that we are treating numeric vectors as unitless quantities. Under this logic, you cannot sum any unit and a unitless quantity:
set_units(3, m) + set_units(2, 1)
#> Error: cannot convert 1 into m
Therefore, your example cannot work.
Hi,
Is there any way you can add a feature that promotes numbers to units on operations like
+
,-
,==
, etc?This way
ggplot2
should work without theggforce
package (which doens't work currently). See:https://github.com/thomasp85/ggforce/issues/190
An example would be:
It seems like a design choice, so I'm unsure if you think it is a good idea or not.