if (inf.rm) DT <- DT[, lapply(.SD, function(x) ifelse(is.infinite(x), NaN, x))]