Rdatatable / data.table

R's data.table package extends data.frame:
http://r-datatable.com
Mozilla Public License 2.0
3.56k stars 973 forks source link

Backward incompatibility due to #5112 breaking reverse dependencies #5208

Closed hsbadr closed 2 years ago

hsbadr commented 2 years ago

bugfix for melt when measure.vars is a named list of length=1 #5112 made a backwards-incompatible change that takes value column names from measure.vars list names, instead of value.name argument, in order to make the behavior of melt() consistent with the documentation (specifically, for measure.vars).

https://github.com/Rdatatable/data.table/blob/96cdef6d03f3fb296778cc7a5550f704d011e083/R/fmelt.R#L217

The above line is now applied if length(measure.vars) == 1L too where value.name can be overridden, which breaks some reverse dependencies as they don't find the expected column name (if relying on using value.name) in the output of melt().

So, it's required to contact the maintainers of the reverse dependencies and ask them to change their code (either unlist measure.vars or set the names of the list correctly) and run R checks with the development version of data.table.

tdhock commented 2 years ago

Matt's revdep check https://github.com/Rdatatable/data.table/pull/5201#issuecomment-939359420 indicates that the following packages may be affected:

ERROR   :   20 : aRbs CornerstoneR doremi dvmisc ecochange EIX getDTeval iemisc iml LMMstar maditr mlr3proba mlr3viz NADIA rasterDT rio riskRegression SpaDES.core txshift VIM 
WARNING :    4 : BTSPAS LexisNexisTools sitree twang 
tdhock commented 2 years ago

iml package has already been fixed, https://github.com/Rdatatable/data.table/pull/5201#issuecomment-939244202

mattdowle commented 2 years ago

@tdhock Those 20 error + 4 warning are the upper bound, yes. Take that output together with the output of cran() in that comment to see which packages are in error and warning status already on CRAN (so not due to data.table-dev). 4 unrelated to melt fixed by #5210. I'm going through it and will post here which are actually impacted ...

mattdowle commented 2 years ago

aRbs: same error on CRAN too, not due to data.table-dev CornerstoneR: known #5126, not melt related getDTeval: known #5127, not melt related iml: known melt related LMMstar: same error on CRAN too, not due to data.table-dev maditr: known #5128, not melt related mlr3proba: same error on CRAN too, not due to data.table-dev mlr3viz: same error on CRAN too, not due to data.table-dev NADIA: nomatch= must be either NA or NULL, data.table-dev related but not melt, I'll look. Error on CRAN is a different one. rio: similar multiple error on CRAN too, not due to data.table-dev SpaDES.core: error in evaluating the argument 'simGraph' in selecting a method for function '.depsLoadOrder': error in evaluating the argument 'simEdgeList' in selecting a method for function '.depsPruneEdges': INTEGER() can only be applied to a 'integer', not a 'character' looks data.table-dev related but not sure whether melt related or not. txshift: same error on CRAN too, not due to data.table-dev VIM: Another nomatch= must be either NA or NULL. data.table-dev but not melt. LexisNexisTools: Same warning on CRAN too, not due to data.table-dev sitree: Same warning on CRAN too, not due to data.table-dev twang: Same warning on CRAN too, not due to data.table-dev

So it is only iml. Happy days! I'll look at the 3 datatable-dev ones (NADIA, SpaDES.core and VIM) and once confirmed not melt related, will close this one.

tdhock commented 2 years ago

great thanks Matt.

mattdowle commented 2 years ago

5214 and #5216 resolve NADIA, SpaDES.core and VIM, unrelated to melt.