It seems that knitr doesn\'t understand that DT[, a:=1] should not result in an output of DT to the document. Is there a way to stop
knitr
DT[, a:=1]
DT
Just surround the expression with invisible(). This works for me.