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

Feature request: return error when errant column used in distinct() #2867

Closed
RickPack opened this Issue Jun 14, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@RickPack

RickPack commented Jun 14, 2017

Can dplyr error out when one identifies a variable that does not exist in the data frame?

## No error returned despite aa not appearing in the complimentary R data frame named "cars"
df <- cars %>% distinct(aa)

@hadley hadley closed this in #2955 Jul 17, 2017

hadley added a commit that referenced this issue Jul 17, 2017

Return error when distinct is used on unknown columns (#2867). (#2955)
* Return error when distinct is used on unknown columns (#2867).

* Change to using bad_cols() for error message, and update NEWS.md (#2867).

* Simplify logic for detecting missing columns in `distinct()`, and add a new test case.

* Update NEWS.md and fix whitespace formatting.

krlmlr added a commit to krlmlr/dplyr that referenced this issue Aug 26, 2017

krlmlr added a commit to krlmlr/dplyr that referenced this issue Aug 26, 2017

Revert unintended API change
This reverts tidyverse#2867 and fixes the regressions found in the "epidata", "fold", and "metaplot" packages.

krlmlr added a commit that referenced this issue Aug 27, 2017

Revert unintended API change (#3055)
* Revert unintended API change

This reverts #2867 and fixes the regressions found in the "epidata", "fold", and "metaplot" packages.

* also remove test
@holgerbrandl

This comment has been minimized.

holgerbrandl commented Sep 26, 2017

Still broken in dplyr_0.7.2. Was it moved to a later release?

@foo-bar-baz-qux

This comment has been minimized.

Contributor

foo-bar-baz-qux commented Oct 16, 2017

@holgerbrandl yes, the change appears to be reverted and moved to v0.9 (probably)

@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.