-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all.equal has no tolerance #332
Comments
Hmm. I think this is hard in the case where we ignore row order because what we do is fill a hash map. and the hash value of two double that are close is not necessarily close:
So tolerance + ignoring row order would be quite hard. It would be quite easy however to implement tolerance for the case where we are not ignoring row order. |
We probably shouldn't define |
Could we back off and use In the case of Perhaps a workaround would be to use a |
I think that if a new version of a base function is implemented in a package it should preserve the default behaviour, otherwise it can cause unexpected side-effects for the user. Maybe the default values for the new arguments could be set so that if they remain unchanged the base Just a few suggestions. I think |
I think we should change |
easy enough, I'll look into what it would change in our testing. |
What about presenting a |
Had to make a few changes to our tests and also have the |
The all.equal.data.frame function needs to have tolerance for numeric columns. For instance:
Importing dplyr into a package with tests using
equals()
from testthat causes them to fail if tolerance is required.The text was updated successfully, but these errors were encountered: