I asked this question before and thought that I could post an example that shows why I saw the effect, in case this might be useful:
require(data.table) x <- data.table(a=1:10) x[,a:=scale(a)]
The reason is that scale does not return a vector and data.table did not complain. Running x[,a:=as.vector(scale(a))] instead fixes the problem. Am I missing something in the documentation?
source share