Closed loicdtx closed 2 years ago
When reducing a vector with the sd function the unit is dropped. Is that the expected behavior?
sd
library(units) a <- rnorm(200, mean = 23, sd = 2.1) b <- set_units(a, m^2) mean(b) # 23.07854 [m^2] sd(b) # [1] 2.199572
Yes, sd is a function, not a generic, so we can't provide a method for units objects.
units
Understood, thanks @edzer
When reducing a vector with the
sd
function the unit is dropped. Is that the expected behavior?