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
{{ message }}
Repository navigation
Melt Function Inconsistency with reshape2 Version #780
This function works if myData is a data frame, but it returns an error if myData is a data table.
Error in melt.data.table(input, id.vars = by, measure.vars = var) :
argument "var" is missing, with no default
This will work if I default var to a NULL value, but then the data frame version will result in an error.
My question is: Is there a reason for the inconsistency? It would be nice to have melt.data.table suppor missing arguments so that there is not a need for the programmer to check the class of myData.
@dardesta, thanks for the report. But, could you please provide a minimal reproducible example - what's myData, var, by etc..? So that I can try to reproduce the issue. Thanks.
Activity
arunsrinivasan commentedon Aug 21, 2014
@dardesta, thanks for the report. But, could you please provide a minimal reproducible example - what's
myData,var,byetc..? So that I can try to reproduce the issue. Thanks.dardesta commentedon Aug 21, 2014
Sure. I'll use the data.table example.
arunsrinivasan commentedon Aug 21, 2014
@dardesta, great example! Thanks. Was easy enough to fix now (although just to be consistent with
melt.data.frame). Will commit soon.