What I'm trying to do is something like this:
DT[,diffs:=c(NA, diff(SPY_mid))]
but in a script, without knowing in advance
DT[,diffs:=c(NA, diff(paste('SPY', '_mid', sep='')))]
doesn't seem to work. Neither does this:
DT[,'diffs':=c(NA, diff(paste('SPY', '_mid', sep=''))), with=F]