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

12.4.1 on any() and all() #1603

Open
lhdjung opened this issue Nov 27, 2023 · 0 comments
Open

12.4.1 on any() and all() #1603

lhdjung opened this issue Nov 27, 2023 · 0 comments

Comments

@lhdjung
Copy link

lhdjung commented Nov 27, 2023

Section 12.4.1, "Logical summaries", says the following about any() and all():

Like all summary functions, they'll return NA if there are any missing values present [...].

This doesn't seem right because any instance of TRUE or FALSE, respectively, will make these functions return non-NA values, even if NA elements are present. This behavior follows from any() and all()'s relationship to the binary logical operators, as explained in the same paragraph.

any(TRUE, NA)
#> [1] TRUE
all(FALSE, NA)
#> [1] FALSE

TRUE | NA
#> [1] TRUE
FALSE & NA
#> [1] FALSE

Created on 2023-11-27 with reprex v2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant