Convert var_name
column to character before replacing NA
s
#1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are updating
tidyr::replace_na()
to utilize vctrs, and that results in slightly stricter / more correct type conversions. See tidyverse/tidyr#1219We noticed in revdeps that this package broke. An easy way to see this is by installing the PR mentioned above and running:
The problem boils down to the fact that you are calling
replace_na()
on numeric columns, but your replacement is a character string ("missing"
). This is no longer allowed. It seems like you wanted the end result to be a character vector anyways, so this PR preemptively changes the!!var_name
column to a character before applyingreplace_na()
.We would greatly appreciate if you could merge this PR and submit a patch release of your package to CRAN so we can send tidyr in!