-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make coerce_to_numeric()
internal
#226
Conversation
Codecov Report
@@ Coverage Diff @@
## main #226 +/- ##
=======================================
Coverage 88.01% 88.01%
=======================================
Files 58 58
Lines 4181 4181
=======================================
Hits 3680 3680
Misses 501 501
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work, we need to keep coerce_to_numeric()
at least as internal.
See data_to_long(mtcars, 2:4)
.
It's worrisome that not a single test failed 😐 |
coerce_to_numeric()
coerce_to_numeric()
internal
Yes, I added a test that should capture this change (hopefully) |
I'm not sure about |
This would be the new behaviour with library(datawizard)
data <- data.frame(
Sepal.Length = c("1", "3", "a"),
Species = c("setosa", "versicolor", "setosa"),
New = c("1", "3", "4")
)
fixed <- data_restoretype(data, reference = iris)
#> Warning in data_restoretype(data, reference = iris): NAs introduced by coercion
fixed
#> Sepal.Length Species New
#> 1 1 setosa 1
#> 2 3 versicolor 3
#> 3 NA setosa 4 and this the old behaviour, when we keep library(datawizard)
data <- data.frame(
Sepal.Length = c("1", "3", "a"),
Species = c("setosa", "versicolor", "setosa"),
New = c("1", "3", "4")
)
fixed <- data_restoretype(data, reference = iris)
fixed
#> Sepal.Length Species New
#> 1 1 setosa 1
#> 2 3 versicolor 3
#> 3 a setosa 4 @DominiqueMakowski what would you say is the expected behaviour? |
(we should add the example of the expected behaviour as test) |
bump 😬 |
bump I want to make a new release soon, since I want the JOSS paper to be based on the more stable API of 0.6.0 instead of the current 0.5.0 release API. Just so you know in case you want this PR to be part of the next release. |
|
coerce_to_numeric()
internalcoerce_to_numeric()
internal
Damn it. Merge conflict again. |
|
Closes #206
I will update
NEWS.md
later.