Skip to content
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

Should predicate functions warn when called with a function that is not a predicate? #470

mikmart opened this issue Mar 7, 2018 · 0 comments
feature a feature request or enhancement map 🗺️


Copy link

mikmart commented Mar 7, 2018

Passing a function that returns a logical vector as the predicate argument to predicate functions can cause unexpected results, as in the example below, from this StackOverflow question.

#> [1] TRUE

Perhaps adding a warning message if the predicate evaluates to a logical vector of length > 1 would be appropriate?

@hadley hadley added feature a feature request or enhancement map 🗺️ labels May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
feature a feature request or enhancement map 🗺️
None yet

No branches or pull requests

2 participants