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

complete() doesn't apply fill if there are no ... inputs #1272

Closed
DavisVaughan opened this issue Dec 14, 2021 · 0 comments · Fixed by #1273
Closed

complete() doesn't apply fill if there are no ... inputs #1272

DavisVaughan opened this issue Dec 14, 2021 · 0 comments · Fixed by #1273
Labels
bug an unexpected problem or unintended behavior grids #️⃣ expanding, nesting, crossing, ... group 👨‍👨‍👦‍👦 missing values 💀

Comments

@DavisVaughan
Copy link
Member

library(tidyr)

df <- tibble(a = c(1, 2, 3), c = c(1, NA, 3))
df
#> # A tibble: 3 × 2
#>       a     c
#>   <dbl> <dbl>
#> 1     1     1
#> 2     2    NA
#> 3     3     3

# should apply fill here anyways
complete(df, fill = list(c = 0))
#> # A tibble: 3 × 2
#>       a     c
#>   <dbl> <dbl>
#> 1     1     1
#> 2     2    NA
#> 3     3     3

complete(df, a, fill = list(c = 0))
#> # A tibble: 3 × 2
#>       a     c
#>   <dbl> <dbl>
#> 1     1     1
#> 2     2     0
#> 3     3     3

Created on 2021-12-14 by the reprex package (v2.0.1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior grids #️⃣ expanding, nesting, crossing, ... group 👨‍👨‍👦‍👦 missing values 💀
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant