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


Copy link

@mikmart 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants