You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
library(data.table)
melt(data.table(a1=1, b1=1, b2=2), na.rm=TRUE, measure.vars=list(a="a1", b=c("b1","b2")))
#> variable a b#> 1: 1 1 1# only one row as expected (since a2 is missing, b2 is removed as well).
melt(data.table(a1=1, b1=list(1:2), b2=list(c('foo','bar'))), na.rm=TRUE, measure.vars=list(a="a1", b=c("b1","b2")))
#> variable a b#> 1: 1 1 1,2#> 2: 2 NA foo,bar# two rows, second a value missing, incorrect since na.rm=TRUE was specified.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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: