Submitted by: shubh bansal; Assigned to: Arun ; [R-Forge link](https://r-forge.r-project.org/tracker/index.php?func=detail&aid=5376&group_id=240&atid=975) In an empty data.table, defining a new column by reference by group does not add the column to the table. In the example below, I would expect an empty column 'c' to be added to the data.table ``` S dt1=data.table(a=character(0),b=numeric(0)) dt1 # Empty data.table (0 rows) of 2 cols: a,b dt1[, c:=max(b), by='a'] dt1 # Empty data.table (0 rows) of 2 cols: a,b ```