Using the ":"
operator I'm trying to add columns in j
argument in data table. These are simple 6 months and 12 Months .. 36 months aggregations
OrderQty36M[,':='(Stat6M=sum(M14:M19)),(Stat12M=sum(M14:M25))]
Can the ":"
argument be used as a sequence operator in data table or there is some other way?
in
[.data.table
(OrderQty36M, ,:=
(Stat6M = sum(M14:M19)), (Stat12M = sum(M14:M25))) :
The items in the 'by' or 'keyby' list are length (1). Each must be same length as rows in x or number of rows returned by i (36703).
In addition: Warning messages:
1: In M14:M25 :
numerical expression has 36703 elements: only the first used
2: In M14:M25 :
numerical expression has 36703 elements: only the first used