Data.table - group by with custom functions that returns a matrix : I have below Data.table

    library(data.table)
    DT = as.data.table(data.frame(Z=c("abc","abc","def","abc"), column=c(1,2,3,4), someOtherColumn=c(5,6,7,8)))

    Fn = function(DT1) {
    		Value = as.numeric(DT1[1, 2])
    		Calc = sapply(DT1[, c("Z"):=NULL], sum) - Value
    		return(matrix(Calc, nr = 1, nc = length(Calc)))
    	}

Now, I want to apply `Fn()` to each group formed by `'Z'`, and get a resulting matrix with 2 rows (because there are 2 unique members in `DT$Z`) and 2 rows

    DT[, Fn(.SD), by = Z, .SDcols = c('Z', 'column', 'someOtherColumn')]

But with that I am getting error as 

    Error in `[.data.table`(DT1, , `:=`(c("Z"), NULL)) : 
      .SD is locked. Using := in .SD's j is reserved for possible future use; a tortuously flexible way to modify by group. Use := in j directly to modify by group by reference.

Any pointer towards the right approach to achieve that same will be helpful.

I have a quick big `DT, so am looking for some efficient method.`