If I'm not mistaken, it doesn't matter what value.var is when fun.aggregate is length. Hence, I often forget to set it explicitly in such cases and the warning message comes across as unnecessary noise:
DT = data.table(a = sample(10, 1000, TRUE), b = rep(1:5, 200))
dcast(DT, a ~ b, fun.aggregate = length)
Using 'b' as value column. Use 'value.var' to override
a 1 2 3 4 5
1: 1 29 14 30 19 23
2: 2 15 22 15 16 11
3: 3 17 14 17 20 18
4: 4 17 18 26 16 31
5: 5 13 19 26 16 18
6: 6 21 22 15 16 25
7: 7 29 24 27 27 20
8: 8 12 20 9 25 16
9: 9 23 30 17 20 16
10: 10 24 17 18 25 22
If I'm not mistaken, it doesn't matter what
value.varis whenfun.aggregateislength. Hence, I often forget to set it explicitly in such cases and thewarningmessage comes across as unnecessary noise: