You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error when histogramming a vector with units in very particular cases - a short vector with some "edge case" values, seems to be related to finding the breaks... I think its because its triggering "fuzz" in the breakpoints and the fuzz parameter isn't unitted:
library(units)
# two numbers near 1, two near 0...
x2u = c(rep(0.0001,2), rep(0.999,2))
# keep this for later
x2 = x2u
# add units to x2u
units(x2u) = "m"
# un-unitted version histograms okay
hist(x2)
# unitted version fails:
hist(x2u)
# Error in Ops.units(breaks, fuzz) :
# both operands of the expression should be "units" objects
packageVersion("units")
[1] ‘0.8.5’
I tried passing a unitted fuzz parameter but that breaks hist.default elsewhere in a comparison between the fuzz and zero:
> hist(x2u, fuzz=fuzz)
Error in Ops.units(fuzz, 0) :
both operands of the expression should be "units" objects
The text was updated successfully, but these errors were encountered:
I get an error when histogramming a vector with units in very particular cases - a short vector with some "edge case" values, seems to be related to finding the breaks... I think its because its triggering "fuzz" in the breakpoints and the fuzz parameter isn't unitted:
I tried passing a unitted
fuzz
parameter but that breaks hist.default elsewhere in a comparison between the fuzz and zero:The text was updated successfully, but these errors were encountered: