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

False positive implicit NA warning with factors and 0-row slices #4460

Closed
DavisVaughan opened this issue Jul 3, 2019 · 1 comment · Fixed by #4497
Closed

False positive implicit NA warning with factors and 0-row slices #4460

DavisVaughan opened this issue Jul 3, 2019 · 1 comment · Fixed by #4497
Labels
bug
Milestone

Comments

@DavisVaughan
Copy link
Member

DavisVaughan commented Jul 3, 2019

These shouldn't be showing up right? It also occurs with vec_slice(ig, 0). We will need to create these 0 row slices for ptypes.

library(dplyr, warn.conflicts = FALSE)
ig <- group_by(iris, Species)
ig[0,]
#> Warning: Factor `Species` contains implicit NA, consider using
#> `forcats::fct_explicit_na`

#> Warning: Factor `Species` contains implicit NA, consider using
#> `forcats::fct_explicit_na`
#> # A tibble: 0 x 5
#> # Groups:   Species [1]
#> # … with 5 variables: Sepal.Length <dbl>, Sepal.Width <dbl>,
#> #   Petal.Length <dbl>, Petal.Width <dbl>, Species <fct>

Created on 2019-07-02 by the reprex package (v0.2.0.9000)

@romainfrancois romainfrancois added the bug label Jul 16, 2019
@romainfrancois romainfrancois added this to the 0.8.4 milestone Jul 16, 2019
romainfrancois added a commit that referenced this issue Jul 17, 2019
romainfrancois added a commit that referenced this issue Jul 17, 2019
@lock
Copy link

lock bot commented Jan 13, 2020

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants