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
{{ message }}
Repository navigation
Strange behaviour comparing numeric vectors with NAs and small (perhaps floating point) differences #43
I'm getting some strange behaviour when using waldo::compare() on numeric vectors which have both small differences (perhaps floating point) and NA values.
If I compare two normal vectors it shows the small difference between them.
Hmmm, solving this is going to require quite a lot of work — the problem is that you can only determine the optimal number of digits to display once you have aligned the diffs, and the code currently assumes that you're aligning strings (i.e. the numbers have already been formatted).
Maybe there's some simpler heuristic that's still better than the current flawed approach, but it's not occurring to me right now.
Activity
hadley commentedon Aug 25, 2020
Hmmm, solving this is going to require quite a lot of work — the problem is that you can only determine the optimal number of digits to display once you have aligned the diffs, and the code currently assumes that you're aligning strings (i.e. the numbers have already been formatted).
Maybe there's some simpler heuristic that's still better than the current flawed approach, but it's not occurring to me right now.