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
When using compare on vectors (lists, data.frames, etc), the tolerance paremater works differently than a naive user would expect. Rather than comparing each entry's deviation separately, it considers the mean deviation of all deviating entries.
While this matches the documented behavior, it probably isn't what a user would intuitively expect.
While I somewhat regret copying the tolerance behaviour of all.equal() (because it's so hard to understand), unfortunately it's very hard to change the behaviour now since so many test are now likely to depend on it.
When using
compare
on vectors (lists, data.frames, etc), thetolerance
paremater works differently than a naive user would expect. Rather than comparing each entry's deviation separately, it considers the mean deviation of all deviating entries.While this matches the documented behavior, it probably isn't what a user would intuitively expect.
Contrived minimal example:
results in
✔ No differences
while many users would probably expect to see the last line (and only the last line) highlighted as difference.
The text was updated successfully, but these errors were encountered: