-
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
Wrong results in "summarise" when characters are used as variable identifiers #567
Comments
The problem is there somewhere:https://github.com/hadley/dplyr/blob/424b304ae235d9ff33b6fbcd7860e8f94ec7e9f2/inst/include/dplyr/Result/Count_Distinct.h @hadley : Should I make
By the same token, would we allow expressions inside of |
Ideally |
Sure. Just wanted to check first, forbid stuff is easier to do. |
Ah. What about this:
|
This is because the underlying class I'm not trying to push towards forbidding things, but it would be easier to name whatever expression that would go inside Also |
Ok, that's reasonable - can you just make |
Done. Only thing allowed is a variable name that must be from the data frame. |
The following code
doesn't rise any errors or warning but returns (randomly) wrong results (but approximately the same magnitude) between 16 and 24, whereas the correct use of the variable.
returns 25.
Indicated by the stackoverflow question "Randomness in dplyr" a similar behavior occurs on larger datasets too.
The text was updated successfully, but these errors were encountered: