-
Notifications
You must be signed in to change notification settings - Fork 992
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
fix for melt with na.rm=TRUE and list column value #4737
Conversation
There was some code which treated lists as a special case, and always used data->narm=FALSE in the C code, even when the user specified na.rm=TRUE in the R code. Seems to me that this is undesirable, due to the inconsistency with the non-list case. If that behavior is desirable to keep, then I would have at least expected some kind of message telling the user that their request of na.rm=TRUE was ignored (seems like there was a message but only if verbose=TRUE). |
Codecov Report
@@ Coverage Diff @@
## master #4737 +/- ##
==========================================
+ Coverage 99.45% 99.46% +0.01%
==========================================
Files 73 73
Lines 14612 14609 -3
==========================================
- Hits 14532 14531 -1
+ Misses 80 78 -2
Continue to review full report at Codecov.
|
This behavior is mentioned on the ?melt.data.table man page: # return 'NA' for missing columns, 'na.rm=TRUE' ignored due to list column
melt(DT, id=1:2, measure=patterns("l_", "c_"), na.rm=TRUE) |
I guess the news item in #4720 covers this one too. |
hi again, I have been trying to get 100% coverage in fmelt.c and some of the uncovered lines revealed a bug. This PR adds a test for this case, and will eventually add a fix. The problem is shown below: