Submitted by: shubh bansal; Assigned to: Arun ; R-Forge link
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
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