diff --git a/R/utilities-unit.R b/R/utilities-unit.R index bfa4268274..c5d3e6041f 100755 --- a/R/utilities-unit.R +++ b/R/utilities-unit.R @@ -35,7 +35,7 @@ collapse_native_units <- function(x) { components <- collapse_native_units(unit_components(x_i)) is_native <- unitType(components) == "native" if (any(is_native)) { - x_i <- f(unit(f(as.numeric(components[is_native])), "native"), components[!is_native]) + unit_components(x_i) <- vec_c(unit(f(as.numeric(components[is_native])), "native"), components[!is_native]) } x_i })